saving . . . saved Regarding Assignment has been deleted. Regarding Assignment has been hidden .
Regarding Assignment
Title
Question
Why is the following code not running properly for calculation of simple interest?
<span style="background-color: rgb(250, 250, 250);">
</span>
<span style="background-color: rgb(250, 250, 250);">#include <stdio.h></span>
int main()
{
float principle=10000;
float rate=>2;
float time=2;
float SI;
SI = principle*rate*time/100;
printf(SI);
return 0;
}

C-and-Cpp Tokens 13-14 min 50-60 sec 20-10-20, 8:44 p.m. bsscharan

Answers:

There is an issue in your printf statement. Please note that we use printf() function with a format specifier to display a variable's value. Thus, you need to replace your printf statement with the one given below:
printf("%f", SI); 
20-10-20, 8:51 p.m. sudhakarst
Thank you.
21-10-20, 9:56 a.m. bsscharan

Login to add comment


#include <studio.h>
int main()
{
    float p=2000;
    float r=>3;
    float t= 3;
    float SI;
    SI=(p*r*t)/100;
    printf"the SI is %.2f : /n");
    return 0;
}
31-03-21, 1:39 p.m. Kadam.Swaraj.Vinayak


#include <studio.h>
int main()
{
    float p=2000;
    float r=>3;
    float t= 3;
    float SI;
    SI=(p*r*t)/100;
    printf"the SI is %.2f : /n");
    return 0;
}
25-07-21, 7:19 a.m. 122070003@sastra.ac.in


Log-in to answer to this question.