/*Program to input an integer value from keyboard and display “WELDONE ” on screen*/
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,n;
cout<<"\n\n\t\tEnter number of times:";
cin>>n;
for(i=0;i<n;i++)
{
cout<<"\n\n\t\tWELDONE";
}
getch();
}
OUTPUT:
/*Program to read values of a,b,c and find x where x=a/(b-c)*/
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c,x;
cout<<"\n\n\t\tEnter a:";
cin>>a;
cout<<"\n\n\t\tEnter b:";
cin>>b;
cout<<"\n\n\t\tEnter c:";
cin>>c;
x=a/(b-c);
cout<<"\n\n\t\tValue of X is:"<<x;
getch();
}
OUTPUT:
/*Program to calculate simple interest*/
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int si,p,n,r;
cout<<"\n\t************Simple Interest******************";
cout<<"\n\n\t\tEnter Principal Amount:";
cin>>p;
cout<<"\n\n\t\tEnter number of Years:";
cin>>n;
cout<<"\n\n\t\tEnter the rate of interest:";
cin>>r;
si=(p*n*r)/100;
cout<<"\n\n\t\tThe simple interest is:"<<si;
getch();
}
OUTPUT: