C program to find the simple interest

/* Write a C program to find the simple interest , given principle, *  * rate of interest and times*/ #include <stdio.h> #include...


/* Write a C program to find the simple interest , given principle, *
 * rate of interest and times*/

#include <stdio.h>
#include <conio.h>

void main()
{

   float p, r, si;
   int t;

   clrscr();

   printf("Enter the values of p,r and t\n");
   scanf ("%f %f %d", &p, &r, &t);

   si = (p * r * t)/ 100.0;
 
   printf ("Amount = Rs. %5.2f\n", p);
   printf ("Rate   = Rs. %5.2f%\n", r);
   printf ("Time   = %d years\n", t);
   printf ("Simple interest  = %5.2f\n", si);

}

/*-----------------------------
Output
Enter the values of p,r and t
2000
8
3
Amount = Rs. 2000.00
Rate   = Rs.  8.00%
Time   = 3 years
Simple interest  = 480.00

------------------------------*/

Related

C TUTORIAL 4504419556455235680

Post a Comment

emo-but-icon

Search Here

Popular query

Follow Us

Ads By Google

Get free Update

Enter your email address:

E-mail verification is must for complete subscription

Delivered by FeedBurner

Circle AFS on Google Plus!

Follow AFS Google+ page
 

Side Ads

DMCA protected
Information, images and the content on this blog is Copyright ©AFS2011-2018. Please do not copy Any content for commercial purpose else we have to take a legal action. Thanks !!

Total Pageviews

Recent

free counters
 

Connect Us

Speech by ReadSpeaker

item