Computers and Technology
Computers and Technology, 23.02.2021 05:40, cutboymon

Q1: Identify and correct the errors in each of the following pieces of code. [Note: There maybe more than one error in each piece of code. a) int x = 1, total; while (x <= 10) { total += x; ++x; } b) while (x <= 100) total += x; ++x; c) public class Mystery { public static void main(String[] args) { int x = 1; int total = 0; while (x <= 10) { int y = x * x; System. out. println(y); total += y; ++x; }// end of while System. out. printf("Total is %d%n", total); }//end of main }//end of class Mystery2 Q2 What does the following program print? public class Mystery3 { public static void main(String[] args) { int row = 10; while (row >= 1) { int column = 1; while (column <= 10) { System. out. print(row % 2 == 1 ? "<" : ">"); ++column; }// end of while column<=10 --row; System. out. println(); }//end of while }//end of main }// end of class Mystery3

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 02:00, hannahliebl2000
What is the largest decimal number that can be represented by a binary number with 4 place values? (remember, each place in a binary number has a value of a power of 2, starting in the ones place with 20.)
Answers: 3
image
Computers and Technology, 22.06.2019 20:00, jumpgirll
The blank button automatically displays next to the data when you select a range of numeric data which is an available option for creating a chart
Answers: 3
image
Computers and Technology, 23.06.2019 09:30, nsjcbdhcb
Light travels at a speed of 186,000 miles a second. the distance light travels in a year is 5,865,690,000,000 miles/year 5,865,695,000,000 miles/year 58,656,950,000,000 miles/year 6,789,000,0000 miles/year
Answers: 1
image
Computers and Technology, 24.06.2019 15:30, jhony70
What type of forensic evidence was recovered during the bomb set off at the new mexico facility on the video that was similar to the evidence obtained at the boston bombings and how did the evidence allow the researchers to connect other pieces of evidence to the same bomb?
Answers: 2
Do you know the correct answer?
Q1: Identify and correct the errors in each of the following pieces of code. [Note: There maybe more...

Questions in other subjects:

Konu
Mathematics, 29.12.2019 08:31