summaryrefslogtreecommitdiff
path: root/5p3.cpp
blob: 734f367710969371152dbc8b5ac882b489841526 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>

/*
 *
 * 5.3
 *
 *
 */

int main () {

	int sum = 0;
	int val = 1;
	while (val <= 10 && (sum += val, ++val));

	std::cout << sum << std::endl;
	return 0;
}