summaryrefslogtreecommitdiff
path: root/4p33.cpp
blob: 7162e879d3a5cef49520fc1511e307d417588905 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>

/*
 *
 * 4.33
 *
 * Wow this might have been the trickiest question ever. I'm still not even sure if i totally get it!
 */

int main () {

	bool someValue = true;
	int res;
	int x = 1;
	int y = 1;
	res = (someValue ? (++x, ++y) : --x), --y;
	std::cout << res << " res"<< std::endl;
	std::cout << x << " x" << std::endl;
	std::cout << y << " y" << std::endl;
	return 0;
}