Can anyone find the mistakes in the given code of Finding The SIMPLE INTEREST ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can anyone find the mistakes in the given code of Finding The SIMPLE INTEREST ?

Here is the Link To the Code : https://code.sololearn.com/cj5NLql164Bc/#c /*Simple Interest*/ #include <stdio.h> void main() { float i,p,r,n; printf("\nEnter Principal Amount :"); scanf("%f,&p"); printf("\nEnter Rate of Interest :"); scanf("%f,&r"); printf("\nEnter Term of Loan :"); scanf("%f,&n"); i=(p+r+n)/100; printf("\nPrincipal Amount is : %f",p); printf("\nRate of Interest is : %f",r); printf("\nTerm of Loan is : %f",n); printf("\nThe Interest Will be:%f",i); printf("\n"); } It is Showing "No Output."

9th Oct 2019, 12:25 PM
Rahil Mavani
Rahil Mavani - avatar
1 Answer
+ 5
Misplaced quotation marks in lines 8, 10, and 12. It should be like scanf("%f", &p);
9th Oct 2019, 12:38 PM
Kishalaya Saha
Kishalaya Saha - avatar