- ..clause 1..: Basic knowledge
- ..clause 2..: Program readout
- Memo
- ..clause 4..: Description type
- ..clause 5..: Basic knowledge(example solution)
- ..clause 6..: Program readout(example solution)
- Memo(example solution)
- ..clause 8..: Description type(example solution)
[ 1-1 ]
What is called the repetition to which the condition is previously judged like the while sentence?
Example solution
[ 1-2 ]
What is called the repetition from which the condition is judged back like the do-while sentence?
Example solution
[ 2-1 ]
For what display is the following program a program?
Judging from the content of processing and the variable identifier, answer.
#include <stdio.h> int main(void) { int year = 0; double money = 10000; while (money < 15000) { year++; money *= 1.01; } printf("%d , %f\n",year , money); return 0; }
Example solution
[ 3-1 ]
I want to make the program that inputs the point of the test.
However, because there is a point of the test only up to 0-100
Input it again when the rest is input.
Example solution
[ 4-1 ]
Explain why it to be suitable for the input check in the do-while sentence concisely.
[ 1-1 ]
Judgment ahead
Problem
[ 1-2 ]
Post-judgment
Problem
[ 2-1 ]
When you entrust 10000 yen to the bank of 1% an interest rate year
Program that displays how many years to take for it to become 15000 yen.
Problem
[ 3-1 ]
Do as follows when you want to make the message displayed at the re-input.#include <stdio.h> int main(void) { int score; Point..input. scanf("%d",&score); } while (score < 0 || score > 100); Printf ("Input point several %d\n" score); return 0; }
It is distinguished whether there are 0 in variable score and it is the first input.
When 0 is input to score, the condition doesn't put it on because it comes off the loop.
#include <stdio.h> int main(void) { int score = 0; "The point : If (Score = 0) ..printf (.. input it within the range of 0-100. \n"); Printf ("Input the point"); scanf("%d",&score); } while (score < 0 || score > 100); Printf ("Input point several %d\n" score); return 0; }
Problem
[ 4-1 ]
Because the do-while sentence is a post-judgment loop, it is executed once without fail in the beginning.
Because the situation of not inputting it doesn't happen.