/*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<<"nnttEnter number of times:";
cin>>n;
for(i=0;i<n;i++)
{
cout<<"nnttWELDONE";
}
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<<"nnttEnter a:";
cin>>a;
cout<<"nnttEnter b:";
cin>>b;
cout<<"nnttEnter c:";
cin>>c;
x=a/(b-c);
cout<<"nnttValue 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<<"nt************Simple Interest******************";
cout<<"nnttEnter Principal Amount:";
cin>>p;
cout<<"nnttEnter number of Years:";
cin>>n;
cout<<"nnttEnter the rate of interest:";
cin>>r;
si=(p*n*r)/100;
cout<<"nnttThe simple interest is:"<<si;
getch();
}
OUTPUT:

Pratik Bakane C++

  • 1.
    /*Program to inputan integer value from keyboard and display “WELDONE ” on screen*/ #include<iostream.h> #include<conio.h> void main() { clrscr(); int i,n; cout<<"nnttEnter number of times:"; cin>>n; for(i=0;i<n;i++) { cout<<"nnttWELDONE"; } getch(); }
  • 2.
  • 3.
    /*Program to readvalues 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<<"nnttEnter a:"; cin>>a; cout<<"nnttEnter b:"; cin>>b; cout<<"nnttEnter c:"; cin>>c; x=a/(b-c); cout<<"nnttValue of X is:"<<x; getch(); }
  • 4.
  • 5.
    /*Program to calculatesimple interest*/ #include<iostream.h> #include<conio.h> void main() { clrscr(); int si,p,n,r; cout<<"nt************Simple Interest******************"; cout<<"nnttEnter Principal Amount:"; cin>>p; cout<<"nnttEnter number of Years:"; cin>>n; cout<<"nnttEnter the rate of interest:"; cin>>r; si=(p*n*r)/100; cout<<"nnttThe simple interest is:"<<si; getch(); }
  • 6.