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, 03.07.2019 15:10
Apiston-cylinder with a volume of 0.25 m3 holds 1 kg of air (r 0.287 k/kgk) at a temperature of 100 c. heat transfer to the cylinder causes an isothermal expansion of the piston until the volume triples. how much heat is added to the piston-cylinder?
Answers: 3
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
Acompressor receives the shaft work to decrease the pressure of the fluid. a)- true b)- false
Answers: 3
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
You know the right answer?
Basic output with variables (java) this zylab activity is intended for students to prepare for a lar...
Questions
question
Advanced Placement (AP), 06.07.2019 16:10
Questions on the website: 13722367