[ create a new paste ] login | about

Link: http://codepad.org/mwpDE1Fp    [ raw code | output | fork ]

C++, pasted on Dec 28:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>
using namespace std;

int main() {
int y=0;
int z=0;
for(int x=0;x<3;x++)
{
z++;
++y;
}
if(z<y)
{
cout << z;
}
else
{
cout << z-1;
}
}


Output:
1
2


Create a new paste based on this one


Comments: