The computer repeats the same thing even times how many.
It is possible to repeat even tens of thousands of hundred million how many times and times if it is necessary.
The repetition includes an uncertain repetition of the repetition and the frequency that the frequency is decided.
In C language, use for (Fo) sentence for the repetition to which the frequency is decided.
Use the for sentence by the following writing.
This I is a variable of the integer type, and it is used to count the frequency of the repetition.int i; Repeated sentence; }
The execution result of this program is as follows.#include <stdio.h> int main(void) { int i; Printf (" message \n"); } return 0; }
It is understood to be displayed to count ten times.
Message
Message
Message
Message
Message
Message
Message
Message
Message
Message
I see ..it is possible to repeat.. when the for sentence is used.
At this time, the variable used might be called a count variable.
The count variable Though anything is good even if it is not i
In C language, in the custom There seem to be a lot of people who use i.
The value of the frequency is repeatedly a variable It is possible to know at any time by referring to i.
The following program is an example of displaying the frequency of the repetition.
The execution result of this program is as follows.#include <stdio.h> int main(void) { int i; Printf ("Time %02d \n" i); } return 0; }
When the result is seen, it is understood to be displayed ten times splendidly.
The 01st
The 02nd
The 03rd
The 04th
The 05th
The 06th
The 07th
The 08th
The 09th
The tenth