-
Notifications
You must be signed in to change notification settings - Fork 4
/
3rdc++.cpp
38 lines (38 loc) · 1.42 KB
/
3rdc++.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include<iostream>
using namespace std;
//the are two types of header file(#include<iostream>)
//1)system header file
//2)user define header file
int main()
{
//cout<<"hello world."<<endl;
int a,b;
cout<<"enter the vlue of a : ";
cin>>a;
cout<<"enter the value of b : ";
cin>>b;
cout<<"--------------------------------------------------------";
cout<<"\n********* the value of a and b is = "<<a<<" and "<<b<<" *********"<<endl;
cout<<"--------------------------------------------------------";
cout<<"\narithmetic operator"<<endl;
cout<<"--------------------"<<endl;
cout<<"the sum of a and b is = "<<a+b<<endl;
cout<<"the substraction of a and b is = "<<a-b<<endl;
cout<<"the multiplication of a and b is = "<<a*b<<endl;
cout<<"the devision of a and b is = "<<a/b<<endl;
cout<<"the reminder of a and b is = "<<a%b<<endl;
cout<<"\ncomparison operator"<<endl;
cout<<"--------------------"<<endl;
cout<<"a==b = ? "<<(a==b)<<endl;
cout<<"a!=b = ? "<<(a!=b)<<endl;
cout<<"a>b = ? "<<(a>b)<<endl;
cout<<"a<b = ? "<<(a<b)<<endl;
cout<<"a>=b = ? "<<(a>=b)<<endl;
cout<<"a<=b = ? "<<(a<=b)<<endl;
cout<<"\nlogical operator"<<endl;
cout<<"----------------"<<endl;
cout<<"the value of ((a==b) && (a>b)) this operator "<<((a==b) && (a>b))<<endl;
cout<<"the value of ((a==b) || (a>b)) this operator "<<((a==b) || (a>b))<<endl;
cout<<"the value of (!(a>b) this operator "<<(!(a>b))<<endl;
return 0;
}