Skip to content

Instantly share code, notes, and snippets.

@MohamedRamadanSaad
Created May 31, 2015 23:11
Show Gist options
  • Save MohamedRamadanSaad/9f468cbc76817d511a88 to your computer and use it in GitHub Desktop.
Save MohamedRamadanSaad/9f468cbc76817d511a88 to your computer and use it in GitHub Desktop.
Simple Calculator Brginner , C++ 2011
#include <iostream>
using namespace std;
int main ()
{
cout<<"\t\t\t\t{Mohamed Ramadan Saad}"<<endl;
cout<<"\t\t\t{Faculty of Computer and Information}"<<endl;
cout<<"\t\t\t\t{From....Sadat....City}"<<endl;
cout<<"................................................................................"<<endl;
cout<<"\t\t\t\t........................."<<endl;
cout<<"\t\t\t\t.\tCalculator\t."<<endl;
cout<<"\t\t\t\t........................."<<endl;
cout<<"This Calculator Contain of Four Option (+ , - , / , *)\n";
cout<<"................................................................................"<<endl;
// The First Of Calculator Here
int x,y,result1,result2,result3,result4;
cout<<"The First Number Is (x)"<<endl;
cout<<"The Second Number Is (y)"<<endl;
cout<<"\t\t\t\tPlease...Enter The First Number "<<endl;
cout<<"\t\t\t\t\t\tx=";
cin>>x;
cout<<"\t\t\t\tPlease...Enter The Second Number\n ";
cout<<"\t\t\t\t\t\ty=";
cin>>y;
result1=x-y;
result2=x+y;
//...ازاي نخلي الناتج بالارقام العشرية
//x=3 , y=2 1.5الناتج يجب ان يصبح
result3=x/y;
result4=x*y;
cout<<"\t\t.................\n";
cout<<"\t\t.Result of x-y="<<result1<<endl;
cout<<"\t\t.................\n";
cout<<"\t\t.Result of x+y="<<result2<<endl;
cout<<"\t\t.................\n";
cout<<"\t\t.Result of x/y="<<result3<<endl;
cout<<"\t\t.................\n";
cout<<"\t\t.Result of x*y="<<result4<<endl;
cout<<"\t\t.................\n";
cout<<"................................................................................\n";
cout<<"\t\t\t\t\tTel : 01097168654\n";
cout<<"\t\t\t\t\tMail: al.ahly30@yahoo.com\n";
cout<<"\t\t\t\t\tPrepared By: Mohamed Ramadan Saad\n";
cout<<"\t\t\tPrint Rights Is Saved For Mohamed Ramadan Saad\n";
cout<<"\n";
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment