Below exercises serve to train conditions
(if
, switch
and conditional expressions)
in the C programming language.
You are not allowed to use the scanf
function for reading user
input. (This leaves fgets(.)
or getline(.)
together
with sscanf(.)
or parsing input via fgetc(.)
family of functions.)
All of your code (including comments and identifiers) has to be written in English.
Enter a number: 26 26 is even.Name the source file: even_or_odd.c
First number: 20 Second number: 12 20 is larger.Name the source file: larger.c
First number: 20 Second number: 12 Third number: 35 35 is the largest number.Name the source file: largest.c
First operand: 20 Second operand: 12 Operator (+, -, *, /, %): + The result is 32.Name the source file: calculator.c