+ 1
Print all natural numbers upto N without using semi-colon.
use the idea of recursively calling main function.
4 Respostas
+ 6
Using Python is a classic 😂. But this worked on code playground for C++ without using return. Not sure in other compilers.
https://code.sololearn.com/cd365bOsxZgC/?ref=app
+ 4
Use python
// No semicolon needed
+ 1
I feel like this could work in real life:
#include <iostream>
int main(int argc, char* argv[]) {
while(std::cout << argc-- && argc) {}
}
To print the numbers up to 1000, call the program and provide 999 command line arguments
0
Rstar gud but how abt if u r coding with c++