3-Write a C program to find the simple interest.

Program: 3

Write a C program to find the simple interest.

#include
#include
void main()
{
    int p, t;
    float si, r;
    printf("Enter the principle: ");
    scanf("%d", &p);
    printf("Enter the rate: ");
    scanf("%f", &r);
    printf("Enter the time: ");
    scanf("%d", &t);
    si=(p*t*r)/100;
    printf("Simple interest is: %f", si);
    getch();
}
Output
Enter the principle: 1000

Enter the rate: 3

Enter the time: 5

Simple interest is: 150.000000

Lokesh Kumar: Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.
Related Post
Leave a Comment

This website uses cookies.