Skip to main content
SEE CS 2083 LEARN • PRACTICE • SUCCEED 🔍

Saturday, March 6, 2021

📚 SEE COMPUTER SCIENCE • CDC 2083

C program to calculate and print the simple interest.

📅 Updated learning resource Quick read 📱 Mobile friendly

 

1.     Write a C program to calculate and print the simple interest.

 

#include<stdio.h>

#include<conio.h>

int main()

{

float p, t, r, i;

printf("Enter principal: ");

scanf("%f", &p);

printf("Enter time: ");

scanf("%f", &t);

printf("Enter rate: ");

scanf("%f", &r);

i = (p*t*r)/100;

printf("Simple Interest = %.2f", i);

return 0;

}

No comments:

Post a Comment

Home 📖Chapters 🎯Quiz MCQs 🔍Search