Pvtburn4
Matthias   Germany
 
 
Was du heute kannst besorgen, das holst du in Ruhe am nächsten Morgen!

Taschenrechner für gehobene Dumme

#include <iostream>
#include <string>
#include <sstream>

const char nl = '\n';

int addition(long long int a,long long int b)
{
long long int r;
r = a + b;
return r;
}

long long int x, y, z, s;

std::string lel;
std::string kek;
std::string l3l;
std::string k3k;
std::string lul;
std::string rip;

int main()
{
lel = "Enter a number X:";
kek = "Enter a number Y:";
l3l = "Error: Input not numeric.";
k3k = "The result is: ";
do
{
nu:
std::cout << lel << nl;
std::cin >> x;
getline(std::cin, rip);
std::stringstream(rip) >> x;
if (x == char())
{
std::cout << l3l << nl;
std::cin.clear();
std::cout << nl;
while (std::cin.get() != nl);
goto nu;
}
yu:
std::cout << kek << nl;
std::cin >> y;
getline(std::cin, rip);
std::stringstream(rip) >> y;
if (y == char())
{
std::cout << l3l << nl;
std::cin.clear();
std::cout << nl;
while (std::cin.get() != nl);
goto yu;
}
s = x + y;
z = addition(x, y);
} while (z != s);
std::cout << k3k << z << nl;
getchar();
}


Owner : cout << "ger_Daedrican";
Понастоящем извън линия
Изложение на най-редките постижения
Любима игра
1 705
Изиграни часа
500 опит
Nuruti 3 юни 2022 в 8:47 
Hi 🙂 Morgen am 4.Juni mache ich ein 12h Special auf meinem Stream https://www.twitch.tv/nuruti
Wir feiern in meinen Geburtstag rein und ich würde mich freuen, wenn du vorbeischaust 🙂

Und falls du vielleicht Lust auf RP hast, ich bin im Juni fast jeden Tag unterwegs in Red Dead Online, Life is Feudal, Conan Exiles oder Atlas. Wenn du mitmachen möchtest, schreib mir einfach 🙂
ger_Daedrican 6 авг. 2018 в 1:06 
+rep, is afk
[livE]Unknown_Genius 7 апр. 2018 в 1:19 
-rep, is dead
Benyashaa 16 февр. 2018 в 15:24 
+rep LUUUUUUUUUUUUUUUUX
[livE]Unknown_Genius 14 февр. 2018 в 10:47 
+rep, oy Aikhahn
Pvtburn4 6 ян. 2018 в 12:25 
Mal sehen xD