Page 1 of 6 123 ... LastLast
Results 1 to 10 of 52
  1. #1
    σиє ℓιfє. ℓινє ιт. C0D-FR34K's Avatar
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
    Gamer IDs

    PSN ID: xC0D--FR34Kx Steam ID: c0d-fr34k

    Default My Calculator ( first c++ program )

    hey guys,

    Ive been learning some more c++ and well ive finished my calculator so here it guys:

    Download:
    Calculator.rar

    So I hope you guys like it

    Plus rep+ if i helped

    EDIT:

    Code:
    #include <iostream>
    using namespace std;
    
    int main(void)
    {
        system("TITLE       C0D-FR34K's Calculator");
        system("COLOR 3");
        char cChar;
        double dfirstnumber;
        double dsecondnumber;
        char cDoagain;
        
    do
    {
        system("CLS");
        cout << "Please enter the first that you would like to use:"
            << endl;
        cin >> dfirstnumber;
        cout << "Please enter the operation that you would like to complete:"
            << " (+, - or /)" << endl;
        cin >> cChar;
        
        cout << "Please enter the second number you would like to use:"
            << endl;
        cin >> dsecondnumber;
            
        switch (cChar) 
        {
               case '+':
                    cout << "The answer is: " << dfirstnumber << " + " <<
                    dsecondnumber << " = " << (dfirstnumber + dsecondnumber)
                    << endl;
                    break;
               case '-':
                    cout << "The answer is: " << dfirstnumber << " - " <<
                    dsecondnumber << " = " << (dfirstnumber - dsecondnumber)
                    << endl;
                    break;
               case '*':
                    cout << "The answer is: " << dfirstnumber << " * " <<
                    dsecondnumber << " = " << (dfirstnumber * dsecondnumber)
                    << endl;
                    break;
               case 'x':
                    cout << "The answer is: " << dfirstnumber << " x " <<
                    dsecondnumber << " = " << (dfirstnumber * dsecondnumber)
                    << endl;
                    break;
               case 'X':
                    cout << "The answer is: " << dfirstnumber << " X " <<
                    dsecondnumber << " = " << (dfirstnumber + dsecondnumber)
                    << endl;
                    break;
               case '/':
                    if(dsecondnumber == 0){
                        cout << "That is an invaled operation" << endl;
                    }else{
                    cout << "The answer is: " << dfirstnumber << " / " <<
                    dsecondnumber << " = " << (dfirstnumber / dsecondnumber)
                    << endl;
                    }
               default:
                   cout << "That is an invaled operation" << endl;
               }
               cout << "Would you like to start again? (y or n)" << endl;
               cin >> cDoagain;
        }while (cDoagain == 'Y' || cDoagain == 'y');
        system("PAUSE");
        return 0;
    }

    0 Not allowed! Not allowed!
    Last edited by C0D-FR34K; 11-01-2011 at 07:55 PM.

  2. #2
    just 'round the corner PoptartHunter's Avatar
    Join Date
    May 2011
    Posts
    4,588
    Points
    8,731
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Posts
    4,588
    Points
    8,731

    Contact info:

    Youtube Channel: http://www.youtube.com/PoptartHunterCL

    Default

    Good job! Did you upload it to the site though? I can't tell because I'm on my iPod. If it is, upload it to a file sharing website please. Aids said that we weren't supposed to upload .exe files. Either way, nice job!

    0 Not allowed! Not allowed!
    Last edited by PoptartHunter; 11-01-2011 at 02:21 PM.

  3. #3
    σиє ℓιfє. ℓινє ιт. C0D-FR34K's Avatar
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
    Gamer IDs

    PSN ID: xC0D--FR34Kx Steam ID: c0d-fr34k

    Default

    thanks and no, wat is that?

    wait like mediafire or something

    0 Not allowed! Not allowed!
    Last edited by Bot; 11-01-2011 at 01:10 AM. Reason: Posts Merged

  4. #4
    just 'round the corner PoptartHunter's Avatar
    Join Date
    May 2011
    Posts
    4,588
    Points
    8,731
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Posts
    4,588
    Points
    8,731

    Contact info:

    Youtube Channel: http://www.youtube.com/PoptartHunterCL

    Default

    A file sharing website; like mediafire, megaupload, rapidshare, etc.

    0 Not allowed! Not allowed!

  5. #5
    Bot Bot's Avatar
    Join Date
    Aug 2011
    Posts
    2,671
    Points
    7,720
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Posts
    2,671
    Points
    7,720

    Default

    Any place but on the site thanks.

    0 Not allowed! Not allowed!








  6. #6
    σиє ℓιfє. ℓινє ιт. C0D-FR34K's Avatar
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Location
    Heaven and Hell
    Posts
    1,444
    Points
    920
    Gamer IDs

    PSN ID: xC0D--FR34Kx Steam ID: c0d-fr34k

    Default

    Ohh ok then, thanks

    0 Not allowed! Not allowed!

  7. #7
    Member Punk's Avatar
    Join Date
    Jul 2011
    Location
    BT5 (Linux)
    Posts
    236
    Points
    711
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    BT5 (Linux)
    Posts
    236
    Points
    711

    Default

    Nice job Stephen maybe now we can work on making a more advance program together!:thumbs:

    0 Not allowed! Not allowed!

    Quote Originally Posted by Russ View Post
    It isn't trolling. It is you being a stuck up lil bitch who thinks he is king of the mods.
    *To see some of my codes click the spoiler*

  8. #8
    MonsterCat
    Insan3Lik3
    CheeseToast's Avatar
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169

    Contact info:

    Youtube Channel: http://www.youtube.com/CheeseToastHax

    Default

    Can I see the coding? I know very very little C++ (I know .gsc but not real C++) and I was wanting to see how you repeat the program after doing the calculations, (guessing you did that in your program)

    0 Not allowed! Not allowed!
    "It's better to lose an argument/debate then to win. Cause when you lose you grow as a person."
    -CheeseToast

  9. #9
    Bot Bot's Avatar
    Join Date
    Aug 2011
    Posts
    2,671
    Points
    7,720
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Posts
    2,671
    Points
    7,720

    Default

    Did he not include the source files?

    Is it just a compiled .exe file?

    0 Not allowed! Not allowed!
    Last edited by Bot; 11-01-2011 at 06:04 AM.








  10. #10
    Member Punk's Avatar
    Join Date
    Jul 2011
    Location
    BT5 (Linux)
    Posts
    236
    Points
    711
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    BT5 (Linux)
    Posts
    236
    Points
    711

    Default

    Quote Originally Posted by CheeseToast View Post
    Can I see the coding? I know very very little C++ (I know .gsc but not real C++) and I was wanting to see how you repeat the program after doing the calculations, (guessing you did that in your program)
    I don't think it is c++ not shore. I think it is codded in MS-DOS Commands.

    0 Not allowed! Not allowed!

    Quote Originally Posted by Russ View Post
    It isn't trolling. It is you being a stuck up lil bitch who thinks he is king of the mods.
    *To see some of my codes click the spoiler*

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 09:55 AM.
Powered by vBulletin®
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.