It is an extremely simple program that does an addition of two integers. I don't know why, but when I run the program, the console requires me to input the two integers and then shows the printf() statements, even though I wrote each printf() before each scanf().
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int a, b;
printf( "Enter first integer\n" );
scanf( "%d", &a );
printf( "Enter second integer\n" );
scanf( "%d", &b );
int sum;
sum = a + b;
printf( "Sum is %d\n", sum );
}
I'll attach what the console shows me as a picture.