/* 1.find the simple intrest.
input are principal amount , peroid in year and rate of intrest */
#include<stdio.h>
#include<conio.h>
void main()
{
int amount, year, rate, intrest;
clrscr();
printf("enter a principal amount: ");
scanf("%d",&amount);
printf("\nenter a peroid in year: ");
scanf("%d",&year);
printf("\nenter a rate of intrest: ");
scanf("%d",&rate);
intrest =( amount * year * rate ) / 100 ;
printf("\n\nThe simple intrest is= %d",intrest);
getch();
}
/* output:
enter a principal amount: 3000
enter a peroid in year: 2
enter a rate of intrest: 3
The simple intrest is= 180
*/
No comments:
Post a Comment