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";
Kirjautunut ulos
Harvinaisin saavutus -esittely
Suosikkipeli
1 705
tuntia pelattu
500 pistettä
Nuruti 3.6.2022 klo 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.8.2018 klo 1.06 
+rep, is afk
[livE]Unknown_Genius 7.4.2018 klo 1.19 
-rep, is dead
Benyashaa 16.2.2018 klo 15.24 
+rep LUUUUUUUUUUUUUUUUX
[livE]Unknown_Genius 14.2.2018 klo 10.47 
+rep, oy Aikhahn
Pvtburn4 6.1.2018 klo 12.25 
Mal sehen xD