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
時間プレイ
Nuruti 2022年6月3日 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 2018年8月6日 1時06分 
+rep, is afk
[livE]Unknown_Genius 2018年4月7日 1時19分 
-rep, is dead
Benyashaa 2018年2月16日 15時24分 
+rep LUUUUUUUUUUUUUUUUX
[livE]Unknown_Genius 2018年2月14日 10時47分 
+rep, oy Aikhahn
Pvtburn4 2018年1月6日 12時25分 
Mal sehen xD