Consider the following fragments of Jova cade Please enter your age: 21 Please enter a random number: 12.21 Please enter

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Consider the following fragments of Jova cade Please enter your age: 21 Please enter a random number: 12.21 Please enter

Post by answerhappygod »

Consider The Following Fragments Of Jova Cade Please Enter Your Age 21 Please Enter A Random Number 12 21 Please Enter 1
Consider The Following Fragments Of Jova Cade Please Enter Your Age 21 Please Enter A Random Number 12 21 Please Enter 1 (34.31 KiB) Viewed 15 times
Consider The Following Fragments Of Jova Cade Please Enter Your Age 21 Please Enter A Random Number 12 21 Please Enter 2
Consider The Following Fragments Of Jova Cade Please Enter Your Age 21 Please Enter A Random Number 12 21 Please Enter 2 (53.68 KiB) Viewed 15 times
Consider The Following Fragments Of Jova Cade Please Enter Your Age 21 Please Enter A Random Number 12 21 Please Enter 3
Consider The Following Fragments Of Jova Cade Please Enter Your Age 21 Please Enter A Random Number 12 21 Please Enter 3 (46.7 KiB) Viewed 15 times
Consider The Following Fragments Of Jova Cade Please Enter Your Age 21 Please Enter A Random Number 12 21 Please Enter 4
Consider The Following Fragments Of Jova Cade Please Enter Your Age 21 Please Enter A Random Number 12 21 Please Enter 4 (60.73 KiB) Viewed 15 times
Consider the following fragments of Jova cade Please enter your age: 21 Please enter a random number: 12.21 Please enter your favorite word: Stay Strong your age is 21your favorite number is 12.21and your favorite word is Stay Program 1: public static void main(String[] args) ( Scanner input new Scanner(System, in): System.out.print("Please enter your age:"); int age input.nextInt(); System.out.print("Please enter a randon number:"); double num input.nextDouble(); System.out.print("Please enter your favorite word: "); String str input.next(); System.out.println("your age is age): System.out.printlnf your favorite number is + num): Which program was used to generate the code fragments? A. Program 1 B. Program 2 C. Program 3
Consider the following fragments of Java code: Please enter your age: 21 Please enter a random number: 12.21 Please enter your favorite word: Stay Strong your age is 21your favorite number is 12.21and your favorite word is Stay Program 1: public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Please enter your age:"); int age = input.nextInt(); System.out.print("Please enter a random number: "); double num=input.nextDouble(); System.out.print("Please enter your favorite word: "); String str input.next(); System.out.println("your age is " + age); System.out.println("your favorite number is num):
System.out.println("your age is " + age); favorite number is " + num); System.out.println("your System.out.println("and your favorite word is str); } Program 2: public static void main(String[] args) ( Scanner input = new Scanner(System.in); System.out.print("Please enter your age: "); int age input.nextInt (); System.out.print("Please enter a random number: "); double num = input.nextDouble(); System.out.print("Please enter your favorite word: "); String str input.next(); M System.out.print("your age is " + age); System.out.print("your favorite number is System.out.print (and your favorite word is " + str); + num); Program 3: public static void main(String[] args) +
www ---(7) System.out.print("Please enter your favorite word: "); String str input.next(); 19 System.out.print("your age is + age); System.out.print("your favorite number is " + num); System.out.print("and your favorite word is " + str); } Program 3: public static void main(String[] args) { Scanner input = new Scanner (System.in); System.out.print("Please enter your age: "); int age input.nextInt (); System.out.print("Please enter a random number: "); double num = input.nextDouble(); System.out.print("Please enter your favorite word: "); String str = input.nextLine(); System.out.print("your age is " + age); System.out.print("your favorite number is " + num); System.out.print("and your favorite word is " + str);
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply