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.

void main ()
float p,n,r,s.i;
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);
printf ("/n simple interest=%f",s.i);

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...