-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata-type.cpp
More file actions
38 lines (31 loc) · 1.49 KB
/
Copy pathdata-type.cpp
File metadata and controls
38 lines (31 loc) · 1.49 KB
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 ;
int main () {
int integer ;
float floating_number ;
double long_floating_number ;
char character ;
string set_of_character ;
short Short = 32767; //maximum limit of short is 32767
long Long = 2147483647; //maximum limit of long is 2147483647
long long LL = 9199568999299999999;
auto AutoDataTypeDetector = "hii";
auto var = 's'; //auto x; will not work need to assign value at a time and can not change var having diff data type
auto var2 = 7294;
// like iterators and lambdas, which you will learn more about in a later chapter, we use auto to keep the code cleaner and easier to understand.
// cout << type(x) ;
// cout << Short << endl;
cout <<"long can store max of " << Long << endl ;
cout << "long long can store max of " << LL << endl;
// cout << "enter integer value : "; cin >> integer;
// cout << "enter decimal value : "; cin >> floating_number;
// cout << "enter decimal value with higher point number : "; cin >> long_floating_number;
// cout << "enter an alphabet : "; cin >> character;
// cout << "enter a word : "; cin >> set_of_character; cout <<"\n";
// cout << integer << " is an integer\n";
// cout << floating_number << " is a decimal number\n";
// cout << long_floating_number << " is a decimal number with extra decimal points\n";
// cout << character << " is an alphabet\n";
// cout << set_of_character << " is a word\n";
return 0;
}