In this easy coded program, you will learn how to calculate compound interest by taking input of principle amount, number of years and rate of interest from user. Try adding final calculated amount which will include the principle amount plus the calculated compound interest in this program for your self practice. --------------------------------------------------------------------------- Program to Calculate Compound Interest /*Compound Interest*/ #include<stdio.h> #include<math.h> void main () { float p, n, r, ci; printf( "Enter Principle Amount, No. of Years, Rate of Interest= " ); scanf( "%f %f %f" , & p, & n, & r); ci = p * pow( 1+ r /100 ,n); ...
Start learning C Language in the easiest way with the most easy to understand program codes with tons of examples along with outputs at BEGINC.