Computer Science, asked by studyhard50, 7 days ago

foot m) Write the program to take principal, rate, and time from the user and display simple interest simple interest = (principal x rate x time)/100

Answers

Answered by kishorekalyan24
0

Answer:

In PYTHON

a=int(input("Enter a principle:"))

b=int(input(Enter a rate:"))

c =int (input(Enter a time:"))

SI=(a*b*c)/100

print("The simple intrest is :",SI)

In C++

#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);

}

Explanation:

check and see both the programs

Similar questions