-
Notifications
You must be signed in to change notification settings - Fork 0
/
basic_code.cpp
71 lines (55 loc) · 1.58 KB
/
basic_code.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#include <iostream>
using namespace std;
int main (){
// input and output
int marks ;
cout << "Enter the marks "<< endl ;
cin >> marks ;
cout << "Printing the marks : " << marks << endl ;
//-----------------------------------------------------------------------
//arithmetic operators
// int a = 5 , b=10;
// cout << a+b << endl ;
// cout << a-b << endl ;
// cout << a*b << endl ;
// cout << a/b << endl ;
// cout << a%b << endl ;
//relational operators
// cout << (a>b) << endl ;
// cout << (a<b) << endl ;
// cout << (a>=b) << endl ;
// cout << (a<=b) << endl ;
// cout << (a==b) << endl ;
// cout << (a!=b) << endl ;
// logical operators
// int age=2;
// int car =12;
// if (age >=18 && car >=1){
// cout << " license pakka "<< endl;
// }
// if (age >=18 || car >=1){
// cout << " license mope "<< endl;
// }
// cout << !age << endl ;
//------------------------------------------------------------------------
//garbage value
// int num;
// cout << num << endl
// cout << "Sandesh Verma"<<endl;
// int num =5;
// // int size is 4 byte
// cout << num <<endl;
// cout << sizeof(num)<<endl;
// // char size is 1 byte
// char ch = 'k';
// cout << ch << endl;
// cout << sizeof(ch)<<endl;
// // float -> 4 byte
// float point =1.89;
// cout << point << endl;
// cout << sizeof(point)<<endl;
// //long -> 4 byte
// long number = 23;
// cout << number << endl;
// cout << sizeof(number)<<endl;
}