Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    PashaAmd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    1,014
    Reputation
    58
    Thanks
    224
    l.m.a.o.
    /tooshort

  2. #17
    Kodacodez's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    Under your bed ;)
    Posts
    24
    Reputation
    10
    Thanks
    1
    My Mood
    Twisted
    this
    cout << "I'm your calculater, how may I help you?" << endl;"

    wasnt even in the code..
    Cause I keep trying and I forgot that I took it out and yeaaah sorry
    READ BEFOR POSTING A REPLY OR YOUR A AN IDIOT

  3. #18
    Departure's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    818
    Reputation
    125
    Thanks
    1,785
    My Mood
    Doh
    just do cin after cout and it will pause and wait for the enter key... shit I don't even know C++ and it makes sense

  4. #19
    PashaAmd's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    1,014
    Reputation
    58
    Thanks
    224
    oh come on he is just learning

  5. #20
    Sixx93's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    673
    Reputation
    21
    Thanks
    250
    My Mood
    Cool
    use: _getch(); from conio.h

    Edit: i've written the entire code for ya:

    Code:
    #include "stdafx.h"
    #include <iostream>
    #include <conio.h>
    using namespace std;
    
    class Calc {	public:
    				double numb1,
    					   numb2;
    					   
    				char operatore;
    };
    
    int main() 
    {
    Calc tri;
    
    cout<<"Press any key to start the Calculator :)"<<endl;
    _getch();
    
    system("cls");
    cout<<"Insert the first number: ";
    cin>>tri.numb1;
    
    
    cout<<"\n\nInsert the second number: ";
    cin>>tri.numb2;
    
    cout<<"\n\nInsert the operator: ";
    cin>>tri.operatore;
    
    cout<<endl<<endl<<endl;
    
    switch(tri.operatore){	case '+': cout<<tri.numb1<<" + "<<tri.numb2<<" = "<<tri.numb1+tri.numb2<<endl; break;
    						case '-': cout<<tri.numb1<<" - "<<tri.numb2<<" = "<<tri.numb1-tri.numb2<<endl; break;
    						case '/': cout<<tri.numb1<<" / "<<tri.numb2<<" = "<<tri.numb1/tri.numb2<<endl; break;
    						case '*': cout<<tri.numb1<<" * "<<tri.numb2<<" = "<<tri.numb1*tri.numb2<<endl; break;
    						default: cout<<"You may have entered an incurrect operator :p"<<endl;
    }
    
    
    _getch();
    return 0;
    }
    Last edited by Sixx93; 04-01-2011 at 11:42 AM.

Page 2 of 2 FirstFirst 12