-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
executable file
·37 lines (26 loc) · 1.13 KB
/
main.cpp
File metadata and controls
executable file
·37 lines (26 loc) · 1.13 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
// main.cpp
// Project 2 Spring 2014
//
// Created by Ibrahima Niang on 2/25/14.
// Copyright (c) 2014 Ibrahima Niang. All rights reserved.
//
#include "LargeInt.h"
int main ()
{
LargeInt x, y, z; // declaration of LargeInt
// y="10"; // initialisation of a LargeInt
cout << "Enter X an integer of your choice : ";
cin>>x; // getting the LargeInt from the user
cout<<endl;
cout << "Enter Y another integer of your choice : ";
cin>>y;
cout<<"X is :"<<x<<endl<<endl;
cout<<"Y is :"<<y<<endl;
if (x == y) // Compare the two LargeInt
cout<<"\nThe two numbers entered are equal."<<endl;
else
cout<<"\n\nThe two numbers entered are different\n\n";
z=x+y; // add the two LargeInt and return it to z
cout<<"X+Y= "<<z<<endl; // display z, the sum of x and y
return 0;
}