Demo entry 6628476

c program code

   

Submitted by anonymous on Jul 04, 2017 at 09:02
Language: C. Code size: 398 Bytes.

//Program to find the simple interest

#include<stdio.h>
int main()
{
		float p,r,t,si;
		
		printf("Enter principle, rate of interest(yearly) & time(in years) : ");
		scanf("%f%f%f",&p,&r,&t);
		si=(p*r*t)/100;
		printf("Simple interest= %f",si);
		return 0;
}

/*
Output:
Enter principle, rate of interest(yearly) & time(in years) : 3020  2.5  3
Simple interest= 226.500000

*/

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).