Skip to content

Commit

Permalink
Create program.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnyKid123 authored Jan 30, 2023
1 parent d6bc6d6 commit 3237b13
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions 2. Programming/1. Data types/Whole numbers/program.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include <iostream>
#include <limits>

using namespace std;

int main()
{
short num = -100;
unsigned char num1 = 128;
short num2 = -3540;
int num3 = 64876;
long long num4 = 2147483648;
int num5 = -1141583228;
long long num6 = -1223372036854775808;
cout << num << endl;
cout << static_cast<int>(num1) << endl;
cout << num2 << endl;
cout << num3 << endl;
cout << num4 << endl;
cout << num5 << endl;
cout << num6 << endl;
return 0;
}




0 comments on commit 3237b13

Please sign in to comment.