VR Indian Wanderers Youtube RSS Feed
Learn with Vikas Suhag
Program to calculate the simple interest using if else in C Language
Nov 26, 2021   Vikas Suhag

Simple interest using if else in C Language

#include<stdio.h>
void main()
{
    int p,n,r;
    float si;
    // if amount deposited for more than 5 years then R=10
    // if number of years <5 r=8;
    printf("Enter values  of P,N");
    scanf("%d%d",&p,&n);
    if(n>5) // condition True
    {
        r=10;
    }
    else // false
    {
        r=8;
    }
    //printf("")
    si=p*n*r/100;
    printf("Interest is =%f",si);
}

 


Leave a Comment

* Email will not be published.
All comments are only visible after approval.
Most Viewed articles
Travel Blog - VR Indian Wanderers
VR Indian Wanderers
Govt. Jobs Portal
Govt. Jobs Portal
Free Chart Maker
Make free animated Charts from .CSV
Search
Youtube Channel
Podcast
Subscribe to Email Updates
Connect With Us
VR Indian Wanderers Youtube RSS Feed
© 2024 Learn with Vikas Suhag. All Rights Reserved.