1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
#include "stdafx.h" #include <iostream> #include <Windows.h> #include <thread> #include <string> using namespace std::this_thread; using namespace std::chrono; using namespace std; int main() { SetConsoleTitle(TEXT("Simple C++!")); for (int index = 8; index > 0; index--) { cout << "Loading In: " << index << std::endl; } sleep_for(seconds(1)); cout << "Simple Calc Loaded! Type Your First Number To Begin\n"; int input1; int input2; string operation; bool isended = false; while (isended == false) { cin >> input1; cout << "Now Type The Name Of The Operation!\n"; cin >> operation; if (operation == "Addition" || "addition") { cout << "Now Your Second Number\n"; cin >> input2; cout << "Ok! Your Anwser is: " << input1 + input2 << endl; } else if((operation == "Subtraction" || "subtraction")); { cout << "Now Your Second Number\n"; cin >> input2; cout << "Ok! Your Anwser is: " << input1 - input2 << endl; } } int pause; cin >> pause; return 1; }
if (operation == "Addition" || "addition")
if (thing on left evaluates true || thing on right evaluates true)
operation == "Addition"
"addition"
==
||
if (operation == "Addition" || true)