0

How run infinite loops on c++

#include <bits/std c++.h> Using namespace ; int main(){ Int i = 1; While (i <= 100){ Cout << I; i++; return(); }

27th Apr 2023, 3:10 AM
Striver
Striver - avatar
6 Antworten
+ 8
int i = 0; while(true) { cout << i++; }
27th Apr 2023, 3:24 AM
A͢J
A͢J - avatar
+ 6
Please use relevant tags for your post And follow this guide next time you submit a post https://www.sololearn.com/Discuss/333866/?ref=app https://code.sololearn.com/W3uiji9X28C1/?ref=app
27th Apr 2023, 4:04 AM
Ipang
+ 3
there's also the old classic for(;;){} or even something fancier like void loop(){ loop(); } PS if you really want to give your computer a hard time don't forget to throw in some malloc abuse and pointers accessing random memory locations
27th Apr 2023, 5:08 AM
Orin Cook
Orin Cook - avatar
+ 1
Rob Newman surprisingly real answer: learning how to break something on purpose is often the best way to learn how not to break it by accident
27th Apr 2023, 11:09 PM
Orin Cook
Orin Cook - avatar