what prints?



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
	int n;
	cout << "enter a positive number: ";
	cin >> n;
	if(n < 0 or n == 0)
	{
		cout << "invalid input, enter again: ";
		cin >> n;
	}
	
	n += 1023;
	
	for(int i = 0; ++i < n;)
	{
		n = n + 321;
		n *=  i;
		++n = i + (n%100);
		--n;n++;
		i++;
		i - 1;
		if (n == 7 or i == 3)
		{
			n++;
		}
	}
	
	cout << n;
I guess undefined behaviour
++n = i + (n%100); //warning: unsequenced modification and access to 'n' [-Wunsequenced]

¿what's the point?
Topic archived. No new replies allowed.