- ..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 are called numerical values other than 0 when it is a conditional judgment?
[ 1-2 ]
What is called 0 when it is a conditional judgment?
Example solution
[ 1-3 ]
What is called the summary of two or more sentences by inclosing it [de]?
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 value,rest; scanf("%d",&value); rest = value % 2; if (rest == 0) printf("E"); if (rest == 1) printf("O"); printf("\n"); return 0; }
Example solution
[ 3-1 ]
When the age is input at the Christian era, is the Olympics held in the age?
Make the displayed program.
The distinction in summer and winter can be displayed if it is possible and it is still good.
The hint: The Sydney Olympics (summer) was holding in 2000.
- Because the condition becomes confusing
Disregard it at the time of the same year summer and winter before.
Example solution
[ 4-1 ]
Though OK is displayed when the above-mentioned program is executedif (-1) printf("OK\n");
Explain it concisely why.
[ 1-1 ]
The truth
- In English True.
[ 1-2 ]
Imitation
- In English False.
Problem
[ 1-3 ]
Block Or complex sentence
Problem
[ 2-1 ]
Display the odd number or the even number the input value.
- O The abbreviation of odd and E : It is abbreviation of even.
- % calculates the remainder. It doesn't forget.
- The last printf function exists only to change line.
Problem
[ 3-1 ]
- Here, year when the Olympics is held can be secondarily divided.#include <stdio.h> int main(void) { int year; Printf ("Input the age at the Christian era"); scanf("%d",&year); If (year % 4 == 0) Printf ("Olympic Summer Games \n"); If (Year % 2 == 0 & year % 4 = 0) Printf ("Olympic Winter Games \n");If (Year % 2 = 0) Printf ("\n that is not the Olympics"); return 0; }
In addition, it was used to divide by even four at the Olympic Summer Games.
- It is assumed that it answers correctly if it requests it by the calculation because other computational methods are thought.
- When the ages are compared as they are without calculating, it is assumed that it mistakes.
Problem
[ 4-1 ]
Because all numerical values except 0 are considered to be the truth in the if sentence
Because it executes it even if it is a negative value.