Modify the code to print the numbers from 1 to 10 inclusive. Then print them on the
Fantastic news! We've Found the answer you've been seeking!
Question:
- Modify the code to print the numbers from 1 to 10 inclusive.
- Then print them on the same line separated by a space, followed by a newline.
- Add code to compute and print out the sum.
- Now make it count backwards from 5 to 1 but without using the literal 1.
int count = 0;
while (count < 5)
{
System.out.println(count);
count++;
}
Related Book For
Posted Date: