Identify all the errors in the following repetition statements. Some errors are syntactical while others are logical
Question:
a. for (int i = 10; i > 0; i++) {
x = y;
a = b;
}
b. int sum = 0;
Scanner scanner = new Scanner(System.in);
do {
num = scanner.nextInt();
sum += num;
} until (sum > 10000);
c. while (x < 1 && x > 10) {
a = b;
}
d. while (a == b) ;
{
a = b;
x = y;
}
e. for (int i = 1.0; i <= 2.0; i += 0.1) {
x = y;
a = b;
}
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Business and Administrative Communication
ISBN: 978-0073403182
10th edition
Authors: Kitty o. locker, Donna s. kienzler
Question Posted: