+ 2
What is the mistake in my c program?please help.
10 Antworten
+ 2
The warning appears because the variable 'amount' is not being used here.
+ 1
Will you copy the code and correct it and send me please
+ 1
Because in SI I have put bracket so why I should not put bracket in amount like this amount=("Principal + amount "); why?
+ 1
OK thank you for telling me
0
//Created by Nitij Yadav
#include <stdio.h>
int main() {
int principle, time, rate, SI,amount;
printf("Enter principle (amount): ");
scanf("%d", &principle);
printf("Enter time: ");
scanf("%d", &time);
printf("Enter rate: ");
scanf("%d", &rate);
SI = (principle * time * rate) / 100;
printf("Simple Interest = %d\n", SI);
amount=principle+SI;
// amount=("principle + SI");
printf("Amount=%d\n",amount);
return 0;
}
0
Amount variable was not been used in the program
0
Why have not you put the bracket? In SI formula bracket was there so I have done but error was coming why we does not have to put bracket in it?
0
Thanks you for telling me
0
While bracket you are telling?
0
It is a comment u can ignore it