If-else if-else, e.g.,
Int code;
code = 2;
if ( code == 1)
printf("Mechanical\n");
else if (code == 2)
printf("Math\n");
else if (code <= 3)
printf("Science\n");
else
printf("Nothing\n");
prints
Math
Previous slide
Next slide
Back to first slide
View graphic version