7
/*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(); }

Pratik Bakane C++

Embed Size (px)

DESCRIPTION

Pratik Bakane C++ programs...............This are programs desingedby sy diploma student from Governement Polytecnic Thane.....programsare very easy alongwith coding andscreen shot of the output

Citation preview

Page 1: Pratik Bakane C++

/*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:

Page 2: Pratik Bakane C++

/*Program to read values of a,b,c and find x where x=a/(b-c)*/

Page 3: Pratik Bakane 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:

Page 4: Pratik Bakane C++

/*Program to calculate simple interest*/

#include<iostream.h>

Page 5: Pratik Bakane C++

#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:

Page 6: Pratik Bakane C++