Pages

Thursday, January 23, 2025

Calculate Simple Interest in C language

 #include<stdio.h>


int main() {

    int principal, t, rate;

    

    printf("Enter the Principal Rate: ");

    scanf("%d", &principal);

    

    printf("Enter the Time in years: ");

    scanf("%d", &t);

    

    printf("Enter the Rate: ");

    scanf("%d", &rate);

    

    int SI = (principal*t*rate)/100;

    printf("The Simple Interest is: %d", SI);

    

    


return 0;


}

CODED and Tested

No comments:

Post a Comment

Stack using Linked List – Partial (University Exam Topic)

 #include <iostream> using namespace std; struct Node {     int data;     Node* next; }; class Stack {     Node* top; public:     Stac...