C
Examples of some
++
program code in C
language
, Example 1:- Write a program to calculate Simple
Interest.
#include <iostream.h>
#include <conio.h>
void main ()
{
float P,R,T,SI;
clrscr ();
cout<< “Enter the value of Principal amount, Rate
and Time;
cin>>P>>R>>T;
SI = (P*R*T)/T;
cout<< “Simple Interest is” << SI;
getch ();
}
Example 2 :- Write a program to accept any
character and check whether it is vowel or
consonant.