First, I'm "noob" in programming. I started college today, and the subject was already rolling (third call has its consequences = P). The code is simple, the third one I created, however, after compiling and writing a value, CMD stops working.
The code itself is:
#include <stdio.h>
#include <windows.h>
int main (void)
{
int sal, novo_sal;
printf ("Entre com sal");
scanf ("%d, &sal");
if (sal >= 1000) {
novo_sal = 1.1 * sal;
printf ("%d", novo_sal);
}
else {
novo_sal = 1.2 * sal;
printf ("%d", novo_sal);
}
}
My question is: Is there something wrong with the code, or with the compiler?