0
Can anyone help me out to find the error over here to calculate the simple interest
#include <stdio.h> main() { float p,r,t,i; printf ("enter the no. of year"); scanf("%f",t); printf ("enter the principal amount"); scanf("%f",p); printf ("enter the rate of interest"); scanf("%f",r); i=(p*r*t)/100; printf("the total interest %f",i); return(0); }
2 Answers
+ 2
You have missed the ampersand (&) operator while taking user input.
It should be- scanf("%f", &t);
0
Please try not make multiple threads under similar topics, it will help in reducing duplicate questions đ
https://www.sololearn.com/Discuss/2162622/?ref=app