#include <stdio.h>
int main(void) {
int x;
for(; scanf("%d",&x) > 0 && x != 42; printf("%d
", x));
return 0;
}
#include <iostream>
using namespace std; // consider removing this line in serious projects
int main() {
int intNum = 0;
cin >> intNum;
while (intNum != 42) {
cout << intNum << "
";
cin >> intNum;
}
return 0;
}
#include <iostream>
using namespace std; // consider removing this line in serious projects
int main() {
auto func = [] () {
int intNum = 0;
cin >> intNum;
while (intNum != 42) {
cout << intNum << "
";
cin >> intNum;
}
};
func();
return 0;
}
Code Example |
---|
Cpp :: result += a +b in c++ meaning |
Cpp :: add integers |
Cpp :: sort array using stl |
Cpp :: c++ create a vecto |
Cpp :: 01matrix |
Cpp :: c++ to c converter online |
Cpp :: c++ void pointer |
Cpp :: c++ How to not use friend declaration when equipping a class with `operator<<` |
Cpp :: stack in c++ data structure |
Cpp :: ala vida |
Cpp :: ex:Roblox |
Cpp :: C++ (ISO) |
Cpp :: how to run c++ on cmd |
Cpp :: assert warning c++ |
Cpp :: How to assign two dimensional initializer list in c++ |
Cpp :: temporary variable ex c++ |
Cpp :: boundary traversal of binary tree |
Cpp :: how to read qlistwidget in c++ |
Cpp :: C++ bool |
Cpp :: are maps sorted c++ |
Cpp :: executing linux scripts |
Cpp :: c++ convert const char* to LPCWSTR |
Cpp :: main function |
Cpp :: c++ do you not inherit constructor |
Cpp :: check if a word is in map c++ |
Cpp :: how to get part from the vector cpp |
C :: run time in c |
C :: manifest orientation portrait |
C :: random number in c |
C :: bootstrap 5 modal not working vue js 3 |