C Program To Calculate Simple Interest
- Simple Interest Program In C++ Language
- Simple Interest Program In C++ Spain
- Simple Interest Program In C++ 2020
Write a C Program To Calculate Simple Interest using class. Here's a Simple Program To Calculate Simple Interest using class in C Programming Language. What is Class and Objects in C? The classes are the most important feature of C that leads to Object Oriented programming. C Program to calculate and print simple interest. Online C Functions programs for computer science and information technology students pursuing BE, BTech, MCA, MTech, MCS, MSc, BCA, BSc. Find code solutions to questions for lab practicals and assignments. Question Write a program which accept principle, rate and time from user and print the simple interest. The formula to calculate simple interest is: simple interest = principle x rate x time / 100. C Programming C program to calculate Simple Interest using function A function is a block of code that performs a specific task. Every C program has at least one function, which is main, and all the most trivial programs can define additional functions. Function can also be defined as the idea to put some repeatedly done task together by making block of statement which helps while instead.
Let us learn how to calculate simple interest in C programming language. We have enlisted two different methods to find simple interest and amount associated with it.
The first method calculates simple interest without using function and the second method has a user – defined function to find the Simple Interest. Simple interest is basically a quick and easy calculation of the interest charged on a given principal amount.
Simple Interest Program In C++ Language
Formula To Find Simple Interest
Simple Interest = (p * n * r) / 100
where,
p = Principal Amount,
n = Number of Years / Period
r = Rate of Interest
Output
Principal Amount = ₹ 3000
Period = 3 years
Rate of Interest = 10%
Simple Interest = ₹ 900
Simple Interest Program In C++ Spain
Let us learn how to calculate simple interest in C programming language. We have enlisted two different methods to find simple interest and amount associated with it.
The first method calculates simple interest without using function and the second method has a user – defined function to find the Simple Interest. Simple interest is basically a quick and easy calculation of the interest charged on a given principal amount.
Simple Interest Program In C++ Language
Formula To Find Simple Interest
Simple Interest = (p * n * r) / 100
where,
p = Principal Amount,
n = Number of Years / Period
r = Rate of Interest
Output
Principal Amount = ₹ 3000
Period = 3 years
Rate of Interest = 10%
Simple Interest = ₹ 900
Simple Interest Program In C++ Spain
This C program takes the values of p, n and r from the user and then applies the above given mathematical formula for simple interest calculation.
Must Read: C Program To Calculate Compound Interest using Functions
Note: This C program for finding simple interest has been compiled with GNU GCC compiler and developed using gEdit Editor and terminal in Linux Ubuntu operating system.Method 1: C Program To Find Simple Interest without Function
2 4 6 8 10 12 14 16 | { floatsi; scanf('%f',&principal); scanf('%f',&period); scanf('%f',&rate); printf('nSimple Interest = %fn',si); return0; |
Method 2: C Program To Calculate Simple Interest using Function
2 4 6 8 10 12 14 16 18 20 22 24 26 | { floatres; scanf('%f',&principal); scanf('%f',&period); scanf('%f',&rate); printf('nSimple Interest = %fn',res); return0; { si=(a *b *c)/100; } |
Must Read: C Program To Display Current Date and Time
Output
In case you get any compilation errors in this C program to calculate simple interest or you have any doubts about it, let us know about it in the comment section below.