[ create a new paste ] login | about

Link: http://codepad.org/rYCGSrvi    [ raw code | output | fork | 1 comment ]

C++, pasted on Sep 12:
1
2
3
#include <iostream>

int main() { std::cout << "Sup likon"; }


Output:
1
Sup likon


Create a new paste based on this one


Comments:
posted by ddsnelle on Mar 29
int x = 0;

int modifyvalue()
{
return(x += 1);
}

int changevalue(int x)
{
if (x == 1)
x++;
else
x = 0;

return x;
}

void addvalue(int& y)
{
y += 4;
}

int main()
{
int x = 0;
int y = 0;
x++;
changevalue(x);
x += modifyvalue();
printf("First output: %d\n", x);
x += 2;
y += changevalue(x);
printf("Second output: %d\n", x);
addvalue(x);
printf("Third output: %d\n", x);
return 0;
}

reply