// A C++ program for performing different Operations.
#include<iostream.h>
#include<conio.h>
void main()
{
int x=10;
int y=x-8;
cout<<endl<<" X = "<<x;
cout<<endl<<" Y = "<<y;
cout<<endl<<" X + Y = "<<x+y;
cout<<endl<<" X - Y = "<<x-y;
cout<<endl<<" X * Y = "<<x*y;
cout<<endl<<" X / Y = "<<x/y;
cout<<endl<<" X % Y = "<<x%y;
getch();
}
#include<iostream.h>
#include<conio.h>
void main()
{
int x=10;
int y=x-8;
cout<<endl<<" X = "<<x;
cout<<endl<<" Y = "<<y;
cout<<endl<<" X + Y = "<<x+y;
cout<<endl<<" X - Y = "<<x-y;
cout<<endl<<" X * Y = "<<x*y;
cout<<endl<<" X / Y = "<<x/y;
cout<<endl<<" X % Y = "<<x%y;
getch();
}
0 comments:
Post a Comment