Answered step by step
Verified Expert Solution
Question
1 Approved Answer
just do the wrong two System out printin ystem ot printint System out printin ( c1 ); Systemout printint e2 774 pointe Suppose sum and
just do the wrong two
System out printin ystem ot printint System "out printin ( c1 ); Systemout printint e2 774 pointe Suppose sum and num are int variables, and the input ss 3, 5, 7,-1 What is the output of the following code? int sum 0 int num console. next Int(); while (num != -1) if (num6) sum = sum + num ; else sum += 25; num = console. nextInt ( ) ; System.out.println (sum) Sum 25 int x 500; double x int k 9: System.out . printipCx); string s1'H' double b1 = 122.8; int y int n1 = 33; / ch of the flowing blocks of code? (Total 32 points) //3 points double a = 14.9; int b 5; b(int) a; System.out.println (b / 2) //4 poionts int num 13; 5; while (num 0) 2) num num 3; System.out.println (num) ; 2 Iek: bi b,n//dlouble nia, ma so int nlS int bl -42.1 doubleni - 3: string s1- int b4 doubleni -9.5 double x1 ml v la tbe n142. 3w-./ int c-a+ b int pl-x1 int a-5; int nl6 char c- ,H1' int x50o string B1H' double bi 122.8 int ni 33 doublexi / double n2s; System.out.printix) Part C: What result is printed by each of the flowing blocks of code? (Total 32 points) /3 points double a14.9 int b5; b(int) a //2 points int r = 9 / 2; System.out.printin(r) u System.out.printin (2) /3 points //4 poionts int num = 13; int fl2, bl25, b2 5 while (num o) b2f1; numnum3 System.out.printin (bl + b2) i System.out.printin (num)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started