Compare commits

..

2 Commits

Author SHA1 Message Date
alex 9c090bc317 Added a missing new line 2026-04-02 00:54:05 +03:00
alex 8dda608d07 Handled case of when calculator doesn't handle numbers correctly 2026-04-02 00:51:42 +03:00
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -80,6 +80,10 @@ Command resolveCommand()
{ {
operation = c; operation = c;
} }
else
{
operation = '+';
}
} }
return {shouldQuit, operation, validation_result.next_arg(), shouldPrint}; return {shouldQuit, operation, validation_result.next_arg(), shouldPrint};
+1 -1
View File
@@ -12,7 +12,7 @@ int main()
while (true) while (true)
{ {
std::cout << "What's your next input? (+,-,*,/,%,$,q,p)"; std::cout << "What's your next input? (+,-,*,/,%,$,q,p)" << std::endl;
auto command = resolveCommand(); auto command = resolveCommand();
if (command.shouldTerminate()) if (command.shouldTerminate())