Chapter -1 Program -1

Also visit our YouTube Channel Tech Eos    VISIT CHANNEL



/* 1 . Find the Simple Interest. Inputs are principal amount,
   period in year and rate of interest.    */

void main()
{
float principal_amount , rate_of_interest ;
int peroid_in_year;

float simple_interest ;

clrscr();

printf("\nEnter principal amount : ");
scanf("%f" , &principal_amount);

printf("\nEnter rate of interest : ");
scanf("%f" , &rate_of_interest);

printf("\nEnter peroid of year   : ");
scanf("%d" , &peroid_in_year);

//    Simple Interest Fromula     (p*r*n)/100

simple_interest = ( principal_amount * rate_of_interest * peroid_in_year )/100;

printf("\n\nSimple Interest is  %f " , simple_interest );

getch();
}

Comments

Popular posts from this blog

Maximum from three numbers (Nested If ) (Chapter 2 Program 2 )

( Chapter 2 Program 7 )

Modular operator in c ( Chapter 1 Program 9)