Results 1 to 6 of 6
  1. #1
    HypnoticBabeTrap's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    35
    Reputation
    10
    Thanks
    28

    [C++]How to make a calculator

    start making a Console Application MSDOS.

    Empty Project.

    Type

    #include <iostream>

    using namespace std;

    int main()
    {
    system ("TITLE Simple Calculator");
    int num1,num2;
    cout << "Please enter 2 numbers: " << endl;
    cin >> num1 >> num2;
    cout << num1 << " + " << num2 << " = " << num1 + num2 << endl;
    cout << num1 << " - " << num2 << " = " << num1 - num2 << endl;
    cout << num1 << " * " << num2 << " = " << num1 * num2 << endl;
    cout << num1 << " / " << num2 << " = " << num1 / num2 << endl;
    system("PAUSE");
    return (0);
    }

    There ya go

  2. #2
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    how about:
    Code:
    #include <iostream>
    int main()
    {
    system("calc.exe");
    return 0;
    }
    >_>...

    Alright I'll try to refrain from critcizing to harshly, but it would be nice if you put your calculator in a loop and used a switch, for different math functions. Otherwise I suppose this is a somewhat acceptable at using cout statements, but pathetic attempt at making a calculator, but it is good start for having absolutely no experience in C++...
    Last edited by why06; 12-03-2009 at 02:27 PM.

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  3. #3
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    That's not really helpful to anyone. It doesn't explain anything. Maybe you can elaborate a little on what's going on here?

  4. #4
    crushed's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    My name is Jay. k?
    Posts
    415
    Reputation
    10
    Thanks
    113
    My Mood
    Sneaky
    Is this a tutorial? Because if it is, a retard like me doesn't understand.

  5. #5
    rwkeith's Avatar
    Join Date
    Jul 2008
    Gender
    male
    Posts
    457
    Reputation
    11
    Thanks
    79
    My Mood
    Angelic
    It's not really a "How To" guide. More like a "Copy This Text in Compiler and Run" type of guide.
    Goals In Life:
    [X] Become an Advanced Member
    [X]Release a tut on mpgh
    [0]Post 300 posts
    [X]Make a working hack
    [X] Learn c++

  6. #6
    BxR's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    21
    Reputation
    10
    Thanks
    9
    again with the shitty copy and paste and we learn nothing from you but your no sensed shitty post

Similar Threads

  1. how to make sample calculator
    By /b/oss in forum Programming Tutorials
    Replies: 11
    Last Post: 03-24-2010, 03:08 PM
  2. [TUT]How to make a Calculator
    By hopefordope in forum Visual Basic Programming
    Replies: 32
    Last Post: 03-03-2010, 12:57 PM
  3. How to make a Basic Addition Calculator + Explenation
    By phoenixraider in forum C++/C Programming
    Replies: 4
    Last Post: 12-21-2008, 01:32 PM
  4. How to make a Zombie
    By arunforce in forum Art & Graphic Design
    Replies: 2
    Last Post: 01-27-2006, 08:07 AM
  5. How I make wallhack?
    By RaidenDXX in forum WarRock - International Hacks
    Replies: 6
    Last Post: 01-23-2006, 01:28 PM