Saturday, 14 April 2018

Program to find simple interest in C

Here we are going to write program to find simple interest. First of all we declare four variable and then input the variable of P,N,R.These are principal ,rate number of year and then use formula for simple interest. Now we are going to write the program.

#include<stdio.h>
void main ()
float p,n,r,s.i;
clrscr();
printf ("/n Enter value of p:");
scanf ("%f",& p);
printf ("/n Enter value of r:");
scanf ("%f",& r);
print ("/n Enter value of n:");
scanf ("%f",& n);
s.i=(p*n*r)/100;
printf ("/n simple interest=%f",s.i);
getch();
}


No comments:

Post a Comment

Featured post

Program to find Volume of given box in java

class volume { public static void main (String args []) { int l=5,b=6,h=10; int volume; volume=l*b*h; System.out.println (" vol...