Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › I gots problem QQ

I gots problem QQ

Posts 1–3 of 3 · Page 1 of 1
SN
Snoozer
I gots problem QQ
Hai all ;o

I tried to make an calculator just like the one that was already posted in this section.. Tried to improve it, by adding a confirmation thingy, and later on things like 6^2=36 etc etc..
(I'm not a copy/paste fag, i retyped it in my own style for educational purposes.. gosh i sound smart x_x)

But the problem is, I can't use the multiply function or divide function so far.
When i try to use the multiply/divide function it openens the subtract function..

Here's the code;


Code:
#include <iostream>
#include <string>

using namespace std; 

int main()
{
    float a;
    float b;
          float s;
    string choice;
    string cont;
    string zchoice;
    
    cout << "\nHello peoplez.\nMy name is Snoozer's Calculator V1.\n";
    cout << "So, How can i help you today?\n\nType \"A\" for Add.";
    cout << "\nType \"S\" for Subtract.\nType \"M\" for Multiply\n";
    cout << "And as last, type \"D\" for Divide\n";
    cin >> choice;
    
    if (choice == "A")
    {
               cout << "\nYou chose Add, is this correct? Type: Yes/No\n";
               cin >> zchoice;
               
               if (zchoice == "No")
               {
                           main ();
               }
               
               else (zchoice == "Yes");
               {
                    cout << "\nOk good!\nPlease type in the first number:\n";
                    cin >> a;
                    cout << "Now type the second number:\n";
                    cin >> b;
                    cout << "    " << a << " + " << b << " = " << a+b << endl;
                    cout << "\n";
                    cout << "Would you like to continue? Type: Yes/No\n";
                    cin >> cont;
                             if (cont == "Yes")
                             {
                                    main ();
                             }
                    
                               else (cont == "No");
                               {
                               return 0;
                               }
               }
    }


    if (choice == "S");
    {
               cout << "\nYou chose Subtract, is this correct? Type: Yes/No\n";
               cin >> zchoice;
               
               if (zchoice == "No")
               {
                           main ();
               }
               
               else (zchoice == "Yes");
               {
                    cout << "\nOk good!\nPlease type in the first number:\n";
                    cin >> a;
                    cout << "Now type the second number:\n";
                    cin >> b;
                    cout << "    " << a << " - " << b << " = " << a-b << endl;
                    cout << "\n";
                    cout << "Would you like to continue? Type: Yes/No\n";
                    cin >> cont;
                             if (cont == "Yes")
                             {
                                    main ();
                             }
                    
                               else (cont == "No");
                               {
                               return 0;
                               }
               }
    }


    if (choice == "M")
    {
               cout << "\nYou chose Multiply, is this correct? Type: Yes/No\n";
               cin >> zchoice;
               
               if (zchoice == "No")
               {
                           main ();
               }
               
               else (zchoice == "Yes");
               {
                    cout << "\nOk good!\nPlease type in the first number:\n";
                    cin >> a;
                    cout << "Now type the second number:\n";
                    cin >> b;
                    cout << "    " << a << " * " << b << " = " << a*b << endl;
                    cout << "\n";
                    cout << "Would you like to continue? Type: Yes/No\n";
                    cin >> cont;
                             if (cont == "Yes")
                             {
                                    main ();
                             }
                    
                               else (cont == "No");
                               {
                               return 0;
                               }
               }
    }


    if (choice == "D")
    {
               cout << "\nYou chose Divine, is this correct? Type: Yes/No\n";
               cin >> zchoice;
               
               if (zchoice == "No")
               {
                           main ();
               }
               
               else (zchoice == "Yes");
               {
                    cout << "\nOk good!\nPlease type in the first number:\n";
                    cin >> a;
                    cout << "Now type the second number:\n";
                    cin >> b;
                    cout << "    " << a << " / " << b << " = " << a/b << endl;
                    cout << "\n";
                    cout << "Would you like to continue? Type: Yes/No\n";
                    cin >> cont;
                             if (cont == "Yes")
                             {
                                    main ();
                             }
                    
                               else (cont == "No");
                               {
                               return 0;
                               }
               }
    }

char f;
cin >> f;
return 0;
}
#1 · 16y ago
LA
lalakijilp
Code:
    if (choice == "S"); //remove the ;
it took me a while but I found it...

if you really want to improve the calculator code-wise google switch and functions so you can make it easier to read and to change.
#2 · 16y ago
SN
Snoozer
Ah.. i see, thanx. xD

And btw, thanx for the tip, will do ^^.
#3 · 16y ago
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

  • Yahoo slurp gots problems :SBy Dave84311 in General
    6Last post 19y ago
  • Hey got problemBy sungkwan11 in WarRock - International Hacks
    1Last post 18y ago
  • Hey guys..got problem here..By tpw1314 in Blackshot Hacks & Cheats
    1Last post 17y ago
  • Guyz Got Problem !!By Kevinnqc in Combat Arms Hacks & Cheats
    9Last post 18y ago
  • Hey guys..got problem here..By tpw1314 in Blackshot Hacks & Cheats
    0Last post 17y ago

Tags for this Thread

None