Key Features

Experienced Teachers
Smart Classes
Regular Test
Study Material

Well qualified teachers with industrial experience.

To visualise or understand topics very easly.

We are organizing online and offline regular test.

We are providing prescribed study material.

Friday, October 30, 2020

Question : Write a C Program to find the simple interest.

Question : Write a C Program to find the simple interest.

/*
Write a C Program to find the simple interest.
SI = (principle * time * rate) / 100
*/

#include <stdio.h>
int main()
{
                float principle, time, rate, SI;
               /* Input principle, rate and time */
               printf("Enter principle (amount): ");
               scanf("%f", &principle);
               printf("Enter time: ");
               scanf("%f", &time);
               printf("Enter rate: ");
               scanf("%f", &rate);
               /* Calculate simple interest */
               SI = (principle * time * rate) / 100;
               /* Print the resultant value of SI */
               printf("Simple Interest = %f ", SI);
               return (0);
}

OUTPUT :
Enter principle (amount): 1200
Enter time: 2
Enter rate: 5.4
Simple Interest = 129.600006


Thank you very much for reading carefully, if you have any other questions, you can share it with us through comments, if this information was important to you, please let us know through comments.

Please do comment and share.
Thank You.

No comments:

Post a Comment