subject
Engineering, 16.01.2020 04:31 2005AngelMoore

Basic output with variables (java) this zylab activity is intended for students to prepare for a larger programming assignment. warm up exercises are typically simpler and worth fewer points than a full programming assignment. warm up exercises are ideally suited for an in-person scheduled lab meeting or as self-practice. the last section provides a full programming assignment. a variable like usernum can store a value like an integer. extend the given program to print usernum values as indicated. (submit for 2 points) (1) output the user's input. enter integer: 4 you entered: 4 (2) extend to output the input squared and cubed. hint: compute squared as usernum usernum. (submit for 2 points, so 4 points total). enter integer: 4 you entered: 4 4 squared is 16 and 4 cubed is (3) extend to get a second user input into usernum2. output sum and product. (submit for 1 point, so 5 points total). enter integer: 4 you entered: 4 4 squared is 16 and 4 cubed is enter another integer: 5 4 5 is 9 45 is 20 lab 1.16.1: basic output with variables (java) 0/5 activity outputwithvars. java load default 1 import java. util. scanner; 2 3 public class outputwithvars public static void main(string [] args) scanner scnr new scanner(system. in); int usernum - 0 6 7 system. out. println ("enter integer: ") usernum scnr. next int ( ) ; 9 10 return; 11 12 13

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 08:10
Which of the following is an easy way to remember the modified “x” tire rotation? a. nondrive wheels straight, cross the drive wheels b. drive wheels straight, cross the nondrive wheels c. drive wheels crossed, nondrive wheels straight d. drive wheels crossed, nondrive wheels crossed
Answers: 1
question
Engineering, 04.07.2019 18:10
Water at 70°f and streams enter the mixing chamber at the same mass flow rate, determine the temperature and the quality of the exiting stream. 0 psia is heated in a chamber by mixing it with saturated water vapor at 20 psia. if both streams enters the mixing chamber at the same mass flow rate, determine the temperature and the quality of the existing system.
Answers: 2
question
Engineering, 04.07.2019 18:10
Afull journal bearing has a journal diameter of 27 mm, with a unilateral tolerance of -0.028 mm. the bushing bore has a diameter of 27.028 mm and a unilateral tolerance of 0.04 mm. the l/d ratio is 0.5. the load is 1.3 kn and the journal runs at 1200 rev/min. if the average viscosity is 50 mpa-s, find the minimum film thickness, the power loss, and the side flow for the minimum clearance assembly.
Answers: 1
question
Engineering, 04.07.2019 18:10
True or false (explain) (110)[111] is a slip system in bcc metals . the {111} family in fcc contains 8 planes. resolved shear stress (rss) in single crystals is just related to the applied stress. critical resolved shear stress (crss) in single crystal metals is direct proportional to the number of defects in the structure
Answers: 2
You know the right answer?
Basic output with variables (java) this zylab activity is intended for students to prepare for a lar...
Questions
question
Mathematics, 31.08.2020 06:01
question
Mathematics, 31.08.2020 06:01
question
Mathematics, 31.08.2020 06:01
question
Mathematics, 31.08.2020 06:01
Questions on the website: 13722360