I wrote a small program in Eclipse Cpp 2019 3 and when I run the program, nothing shows in the console. My program is this:
#include <stdio.h>
int main(void)
{
int integer1;
int integer2;
int sum;
printf("enter first integer\n");
scanf("%d", &integer1);
printf("enter second integer\n");
scanf("%d", &integer2);
sum = integer1 + integer2;
printf("Sum is %d\n", sum);
}
As you can see there is nothing wrong with the code, but when I build and run it the output should show up in the console with the first string being "enter first integer", though nothing shows in the console. So I tried to enter the integer1 and integer2 in the console and pressed enter. The output and the result for the given integer1 and integer2 than show in the console. My question is How do I fix it or is there a certain setting I need to do? Thank you.