Codeblocks says"File.exe has stopped working" when i want to enter input.Why?

by tuck_y   Last Updated July 16, 2018 12:05 PM

    #include<stdio.h>
#include<conio.h>
int main()
{
 int P,T,R; float I;
 printf("Enter P,T,R");
scanf("%d%d%d",P,T,R);
 I=P*T*R/100;
 printf("Interest=%f",I);
 getch();
 }

i wrote this code in codeblocks to calculate simple interest using I=PTR/100. Then i compiled and build and run. The program then opened. When it opened, it asked me to input P,T,R and when I input P,T,R- the program said that it has stopped working. How?-I am confused. How can I fix this?



Related Questions




Nesting class and enums types

Updated September 07, 2017 11:05 AM