2024-08-25 20:00:46 -06:00

19 lines
424 B
C++

// Demonstration of subtraction and Interger Overflow
#include <iostream>
using namespace std;
int main()
{
typedef unsigned int UINT;
UINT difference;
UINT bigNumber = 100;
UINT smallNumber = 50;
difference = bigNumber - smallNumber;
cout << "Difference is: " << difference;
difference = smallNumber - bigNumber;
cout << "\nNow the difference is: " << difference << endl;
return 0;
}