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 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 日 下午 3:24 
+rep LUUUUUUUUUUUUUUUUX
[livE]Unknown_Genius 2018 年 2 月 14 日 上午 10:47 
+rep, oy Aikhahn
Pvtburn4 2018 年 1 月 6 日 下午 12:25 
Mal sehen xD