ಠ_ಠ
Thank you.
klimi
Vim is fine without plugins
ಠ_ಠ
It is mostly for Competitive Programming.
klimi
Oh, snippets
klimi
A train your wpm
ಠ_ಠ
I'm having a weird issue when I press: { it removes the identation.
ಠ_ಠ
A train your wpm
Typing speed?
ಠ_ಠ
Yes
What about this? https://typing.io/
klimi
Don't know
Anonymous
Hii
Anonymous
i am from india
Dima
Anonymous
what about sun
Shivam
what about sun
Too hot br0
Anonymous
Too hot br0
i ain't go to the sun
Anonymous
Too hot br0
from where
Anonymous
Will humor get me banned also? :)
Anonymous
Hello everyone, nice to be here, and nice to meet you all
Anonymous
Will humor get me banned also? :)
If the humor isn't C/C++ related maybe
Anonymous
Thank you for the greeting.
klimi
:D
MᏫᎻᎯᎷᎷᎬᎠ
scammer.xyz
Hello peeps. Im new to c++
Dima
welcome
Dima
be nice and read the rules
scammer.xyz
I did just now. Thanks
Anonymous
Hello
where r u from
Anonymous
Shivam
where r u from
No ot here bruh
Shivam
#ot
Anonymous
hey
Anonymous
my try doesn't worked
Anonymous
gist : https://gist.github.com/orhan55555/6a9a9fdd4339436b765bb36b6c93ce02
Dima
Nikolas
Not even trying to understand it. At least use english in your code.
Anonymous
👌
Anonymous
hii
Anonymous
#include <iostream> using namespace std; int main() { double choosing, number1, number2, result; cout << "Welcome To Calculator.\nPlease Make Your Choose:\n1-Add\n2-Extraction\n3-Multiply\n4-Division\nYour choosing 1-4 ? : "; cin >> choosing; if (choosing == 1) { cout << "Enter Your First Number : "; cin >> number1; cout << "Enter Your Second Number: "; cin >> number2; result = number1 + number2; cout << "Your Result : " << result; } else if (choosing == 2) { cout << "Enter Your First Number : "; cin >> number1; cout << "Enter Your Second Number: "; cin >> number2; result = number1 - number2; cout << "Your Result : " << result; } else if (choosing == 3) { cout << "Enter Your First Number : "; cin >> number1; cout << "Enter Your Second Number: "; cin >> number2; result = number1 * number2; cout << "Your Result : " << result; } else if (choosing == 4) { try { cout << "Enter Your First Number : "; cin >> number1; cout << "Enter Your Second Number: "; cin >> number2; result = number1 / number2; cout << "Your Result: " << result; } catch (string s) { cout << "Please Do Not Enter Your Second Number To ZERO."; } } cout << "\n"; system("Pause"); }
Anonymous
try catch doesn't worked
Mimi
try catch doesn't worked
Catch should have an argument of error type
Mimi
#include <iostream> using namespace std; int main() { double choosing, number1, number2, result; cout << "Welcome To Calculator.\nPlease Make Your Choose:\n1-Add\n2-Extraction\n3-Multiply\n4-Division\nYour choosing 1-4 ? : "; cin >> choosing; if (choosing == 1) { cout << "Enter Your First Number : "; cin >> number1; cout << "Enter Your Second Number: "; cin >> number2; result = number1 + number2; cout << "Your Result : " << result; } else if (choosing == 2) { cout << "Enter Your First Number : "; cin >> number1; cout << "Enter Your Second Number: "; cin >> number2; result = number1 - number2; cout << "Your Result : " << result; } else if (choosing == 3) { cout << "Enter Your First Number : "; cin >> number1; cout << "Enter Your Second Number: "; cin >> number2; result = number1 * number2; cout << "Your Result : " << result; } else if (choosing == 4) { try { cout << "Enter Your First Number : "; cin >> number1; cout << "Enter Your Second Number: "; cin >> number2; result = number1 / number2; cout << "Your Result: " << result; } catch (string s) { cout << "Please Do Not Enter Your Second Number To ZERO."; } } cout << "\n"; system("Pause"); }
And also: iostream includes string in it. So you don't need to #include string separately.
Dima
LMAO “hacker india group"
Dima
XDDDD
Dima
Ultra cringe intensifies
Dima
/ban Viraj hack yourself
Anonymous
well What's the solution?
klimi
They welcomed me
Mimi
well What's the solution?
Well now I see that in c++ division by zero is not an error so I'm confused
Anonymous
anway thankyou.
Onkar
Hi
klimi
Hi
Shivam
High
Dima
Got me mad.
Dima
Hugh
Inf*, Im sorry
Mimi
Inf*, Im sorry
But it's not an error, right? So you can't catch it? Is it correct to use a simple if-statement in order to "catch" the zero-division?
Anonymous
:)
Hugh
I never had to check division by 0
Mimi
Im not sure, but I think that u can't catch it
If it's not an error of course you can't catch it the usual way. But my question is if you can write something like that: if (num == +infinity) cout << "You typed 0";
Mimi
I'm not sure about the Syntex, but the idea
Hugh
Inf is const big number
Hugh
1e9
Mimi
no, better if(num>inf)
How is it even possible to check this
Hugh
Wait
Mimi
There shouldn't be a number bigger than inf
Mimi
It's impossible
Hugh
#include <iostream> #define inf 1e9 using namespace std; int main() { double a, b; cin >> a >> b; if(a/b>inf) cout << "divbyzero\n"; else cout << a/b; return 0; }
Mimi
But if you say so...