I have just started to learn C after a long time (briefly learnt it during school but mostly forgot everything since then). Anyways I just wrote a simple program to calculate simple interest.
#include <stdio.h>
int main( ) {
int p,n;
float r,si;
printf("Enter the value");
scanf("%d,%d,%f",&p,&n,&r);
si = p*r*n/100;
printf("%fn",si);
return 0;
}
But one thing I noticed was that not including the printf statement at the end causes the C compiler to give the following error.
The system cannot execute the specified program.
It also causes my antivirus (McAffe) to treat the .exe file as a threat.
Does anyone know why this happens. I’m just curious.