Program Input:
#include <stdio.h>
int maim()
{
int p,r,t,int_amt;
printf("Input principle, Rate of interest & time to find simple interest:\n");
scanf("%d%d%d",&p,&r,&t);
int_amt=(p*r*t)/100;
printf("Simple interest = %d,int_amt");
return 0;
}
Below, I have represented the inputs that I have used in an online c program compiler:
Program Output:
Input principle = 1000
Input Rate of interest = 10(%)
Input time = 2(Year)
Below, I have represented the Outputs that I have obtained from the online c program compiler:
Output is showing
Simple interest as 200
0 comments:
New comments are not allowed.