subject

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

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 13:30
Drag the tiles to the correct boxes to complete the pairs. match the errors with their definitions. #name #value #ref when a formula produces output that is too lengthy to fit in the spreadsheet cell arrowright when you enter an invalid cell reference in a formula arrowright when you type text in cells that accept numeric data arrowright when you type in a cell reference that doesn’t exist arrowright reset next
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
An english teacher would like to divide 8 boys and 10 girls into groups, each with the same combination of boys and girls and nobody left out. what is the greatest number of groups that can be formed?
Answers: 2
question
Computers and Technology, 23.06.2019 18:30
How often does colleges update the cost of attendance on their website? . a)every two years b) every four years c) every year d) every semester
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
You can apply several different worksheet themes from which tab?
Answers: 1
You know the right answer?
Q1: Identify and correct the errors in each of the following pieces of code. [Note: There maybe more...
Questions
question
History, 23.03.2021 19:00
question
Advanced Placement (AP), 23.03.2021 19:00
question
Biology, 23.03.2021 19:00
question
Mathematics, 23.03.2021 19:00
question
Mathematics, 23.03.2021 19:00
question
Computers and Technology, 23.03.2021 19:00
question
Engineering, 23.03.2021 19:00
question
Mathematics, 23.03.2021 19:00
Questions on the website: 13722360