// =================================================================== // Program: if_then_else_v1.c // Date: July 2020 // Author: Jean-Michel Richer // Email: jean-michel.richer@univ-angers.fr // =================================================================== // Description: // This program shows how to code a if then else statement in C. // It is intended to be translated in 32 bits x86 assembly // language. // =================================================================== #include #include // global integer variables int a = 1; int b = 2; /** * main function */ int main(int argc, char *argv[]) { // compare 'a' to 'b' and print message if (a < b) { printf("a < b\n"); } else { printf("a >= b\n"); } return EXIT_SUCCESS; }