Program 2

Write a program to calculate simple interest (i = (prn)/100 )
i = Simple interest
p = Principal amount
r = Rate of interest
n = Number of years

#include<stdio.h>
void main()
{
int p=1000;
int n=7;
float r=8.5;
float i;

i=(p*r*n)/100;

printf(“simple intrest=%f”,i);

}

Output

simple intrest=595.000000

Leave a comment

Design a site like this with WordPress.com
Get started