Computer Science, asked by paras1608, 6 months ago

Write a program to calculate simple interest, where principal = 10000,rate = 5%,and time = 4 years (Write this program in C++)
Please help me

Answers

Answered by Ashishchaturvedi
0

Answer:

#include <stdio.h>

int main()

{

float principle, rate, sinterest;

int time;

printf("Enter Principle Amount, Rate %% per Annum and Time\n");

scanf ("%f %f %d", &principle, &rate, &time);

sinterest = (principle * rate * time)/ 100.0;

printf ("Principle Amount = %5.2f\n", principle);

printf ("Rate %% per Annum = %5.2f%\n", rate);

printf ("Time = %d years\n", time);

printf ("Simple Interest = %5.2f\n", sinterest);

}

Answered by kummarikuntasahasra
0

Answer:

Then all the four values i.e. principal, rate and time along with the calculated value of simple interest gets displayed using four printf statements. The getch reads a single byte character from input and getch is a proper way to fetch a user inputted character.

hope it will help you

Similar questions