C Program to calculate simple interest using no paramater, no return type

#include”stdio.h”
#include”conio.h”
float si();
void main()
{
clrscr();
si();
getch();
}

float si()
{
float p, r, t;
printf(“Enter Principle Amount: “);
scanf(“%f”,&p);
printf(“Enter Rate of Interest: “);
scanf(“%f”,&r);
printf(“Enter Time in Year: “);
scanf(“%f”,&t);
printf(“Simple Interest: %f”,(p*r*t)/100);
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s