Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

C++14 (gcc 8.3) sample

#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;
}
Source by ideone.com #
 
PREVIOUS NEXT
Tagged: #sample
ADD COMMENT
Topic
Name
6+5 =