f) Explain the meaning of each of the following lines in the context of programming:
(i) int i;
int remain, evenodd=31;
(ii) remain = evenodd % 2;
(iii) if (remain == 0)
(iv) printf("The Number is an EVEN number");
(v) else printf("The Number is an ODD number");
Answers
Answered by
2
The explanation of the commands is given below:
i) A variable is defined in which an integer can be stored and an integer 31 is stored in the variable
ii) Divide that number with 2
iii) Conditional loop has been started
iv) If remainder is zero print “THE NUMBER IS AN EVEN NUMBER”
v) If remainder is NOT zero print “THE NUMBER IS AN ODD NUMBER”
Similar questions
Political Science,
6 months ago
Computer Science,
6 months ago
History,
6 months ago
English,
1 year ago
Chemistry,
1 year ago