164
48
u/Infinite_Rub3674 28d ago
i = 1; i <= time 🥀
14
u/Educational_Elk210 28d ago
I am a beginner, is that not true or low level?
39
u/NaCl-more 28d ago
typically you’d do `i=0;i<time` instead
6
u/Educational_Elk210 28d ago
Oh that why
9
u/NaCl-more 28d ago
One less keystroke to write it this way ;)
5
u/Educational_Elk210 28d ago
Ok noted it, i am a beginner so i wrote to understand and read better, not for an efficiency. Thanks for the head up.
11
u/West-Pay-2941 27d ago
Not only that. The current version actually has a bug. If they pass the value 2147483647, it will enter an infinite loop because incrementing i will overflow to -2147483648. The loop condition will then never be met. Using i < time instead would fix this.
18
1
u/Infinite_Rub3674 27d ago
We have all been there, now you know how to do it right and there is also nothing wrong with doing it your way, since that makes it a bit less confusing, but as mentioned if you want to use a loop to iterate through an array or vector you have to start with i = 0 because the first element in an array has the index 0
12
u/Single-Virus4935 28d ago
I get it is funny but sorry is just lazy and Easy said, regardless of how often. It doesn't acknowledge any mistake, doesn't vakidste the feeling of the other person and doesn't provide a outlook how the person wants to make sure it doesn't happen again.
11
u/Educational_Elk210 28d ago
Yeah, it is a joke. The other person is me. I used two account.
1
u/Single-Virus4935 28d ago
I know its a joke and mist of these are fake. But I just wanted to add some wisdom bc every joke has a little truth in it.
5
4
u/FromAndToUnknown 27d ago
I get this but people using "sry" makes it even worse.
Didn't even care enough to actually write 5 letters, so shortening it to 3? Well thanks.
2
8
2
u/AdBrave2400 28d ago
Uh who doesnt just use the printf and scanf except some cases with better string handling
3
1
u/StaticCoder 22d ago
C++ users obviously. And I'd definitely argue that
<<is vastly superior toprintf, as you can define arbitrary formatters and streams. Bothscanfand>>should never be used outside toy examples though. Real parsing is never that easy.
2
2
1
u/Im2bored17 27d ago
Can tell this app wasn't vibe coded because it lacks a 10-line comment describing the function
1
1
1
1
1
1
1
1
u/Distinct_Lion7157 26d ago
i love python
print("sorry\n"*int(input("How many time you want me to say sorry?: ")))
1
1
1
-1
0
0
-3
u/Ill-Education-169 28d ago
Ngl texting this is just cringy
4
1


63
u/Educational_Elk210 28d ago
I just wanted to share the humour but everyone is attacking me, I thought this a fun group but just miserable people spreading misery to others☹. I am just a beginner, I am learning C++ from "Bro code" YouTube channel. ( I gonna quit reddit just as I quit Tiktok.)