C PROGRAM TO CALCULATE SIMPLE INTEREST
#include<stdio.h> //header file stdio.h
#include<conio.h> //header file conio.h
main() //main function
{ //start of the program
int p,n,r,simple_interest; //variable declaration
printf("enter the values of p,n,r");
scanf("%d%d%d",&p,&n,&r); // read the values from user
simple_interest=p*n*r/100; //simple interest formula
printf("simple interest is %d",simple_interest);
getch();
} //end of the program
#include<stdio.h> //header file stdio.h
#include<conio.h> //header file conio.h
main() //main function
{ //start of the program
int p,n,r,simple_interest; //variable declaration
printf("enter the values of p,n,r");
scanf("%d%d%d",&p,&n,&r); // read the values from user
simple_interest=p*n*r/100; //simple interest formula
printf("simple interest is %d",simple_interest);
getch();
} //end of the program
No comments:
Post a Comment