You are on page 1of 2

#include <iostream>

using namespace std;

int main() {
double fNum; //I used double as the data type for fNum and sNum so that
quotient will show decimal points
double sNum;
int sum; // I used (int) for sum, dif. and product because we expect the user
to input integers.
int difference;
int product;
double quotient;

cout<<"**************************:CALCULATOR CONSOLE
APPLICATION:*******************************\n";
cout<<"============================================================================
=============\n";
cout<<"This will show you the ADDITION, SUBTRATION, MULTIPLICATION, and DIVISION of
Two Integers.";
cout<<endl<<"======================================================================
===================\n\n";

cout<<"Enter First Number Below and Press Enter: \n";


cin>> fNum;
cout<<"Enter Second Number Below and Press Enter: \n";
cin>> sNum;

cout<<endl<<endl<<"================================================================
=========================";
cout<<endl<<"Mathematical Phrase:";
cout<<endl<<"======================================================================
===================";

sum= fNum + sNum;


difference= fNum - sNum;
product= fNum * sNum;
quotient= fNum / sNum;

cout<<endl<<endl<< "The Sum of "<<fNum<<" and "<<sNum<<" is "<<sum;


cout<<endl<<endl<< "The Difference of "<<fNum<<" and "<<sNum<<" is
"<<difference;
cout<<endl<<endl<< "The Product of "<<fNum<<" and "<<sNum<<" is "<<product;
cout<<endl<<endl<< "The Quotient of "<<fNum<<" and "<<sNum<<" is
"<<quotient<<endl<<endl<<endl;

cout<<"============================================================================
=============";
cout<<endl<<"Mathematical Expression:"<<endl;
cout<<"============================================================================
=============";

cout<<endl<<endl<< ":ADDITION: "<< ":SUBTRACTION:\n";


cout<<fNum <<" + "<<sNum<<" = "<<sum;
cout<<" "<<fNum<<" - "<<sNum<<" = "<<difference
<<endl<<endl;

cout<<endl<< ":MULTIPLICATION: "<< ":DIVISION:\n";


cout<<fNum <<" * "<<sNum<<" = "<<product;
cout<<" "<<fNum<<" / "<<sNum<<" = "<<quotient
<<endl<<endl<<endl;

cout<<endl<<"********************************BY: MHERWIN L.
RETANAL***********************************";
cout<<endl<<"======================================================================
==================="<<endl<<endl<<endl;
}

You might also like