[ create a new paste ] login | about

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

C, pasted on May 27:
#include <stdio.h>
int main(){
	int a, b, c, t;
	scanf("%d", &a);
	scanf("%d", &b);
	if(a > b){
		t = a;
		a = b;
		b = t;
	}
	scanf("%d", &c);
	if(b > c){
		if(a > c){
			temp = a;
			a = c;
			c = t;
		}
		t = b;
		b = c;
		c = t;
	}
	printf("%d %d %d\n", a, b, c);
	return 0;
}


Output:
1
2
3
4
In function 'main':
Line 14: error: 'temp' undeclared (first use in this function)
Line 14: error: (Each undeclared identifier is reported only once
Line 14: error: for each function it appears in.)


Create a new paste based on this one


Comments: