[ create a new paste ] login | about

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

C, pasted on Jun 13:
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdio.h>
void main()
{
int x,y;
scanf("%d",&x);
if(x<0)
y=-1;
else
if(x==0)y=0;
else y=1;
printf("x=%d,y=%d\n",x,y);
}


Output:
1
x=134513565,y=1


Create a new paste based on this one


Comments: