Create a C program to print the first 50 numbers in reverse order, using "For loop". ( Please give me the correct answer ) CLUE: You should be using the decrement operator in your "For loop".
Answers
Answer:
nqjjananananNNNnNM
Explanation:
nanamammamaMMmama
Answer:
Explanation:
Java Loops & Methods
The while loop
Syntax:
while ( condition is true ) {
do these statements
}
Just as it says, the statements execute while the condition is true. Once the condition becomes
false, execution continues with the statements that appear after the loop.
Example:
int count = 1;
while (count <= 10) {
out.println(count);
count = count + 1;
}
This loop prints out the numbers from 1 through 10 on separate lines. How does it work?
Output:
1
2
3
4
5
6
7
8
9
10
This is an example of a counting loop. They are called this because the loop is just counting
through the values of the loop control variable (LCV), which in this case is called count. It
executes a definite number of times.
while loops can also be used as indefinite loops – when you can’t pre-determine how many
times the loop will execute. For example, let’s take this problem.
A colony of 800 puffins is increasing at the rate of 4% annually. When will their population first
exceed 1200?
Without doing the calculations, can we determine how many times this loop will run? No!
We’ll use a while loop to solve it, though:
import components.simplewriter.SimpleWriter;
import components.simplewriter.SimpleWriter1L;
/**
*