[ create a new paste ] login | about

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

C, pasted on Apr 21:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include<stdio.h>
#include<conio.h>

int deQuy(int n)
{
	if(n % 2 != 0)
		return n;
	return deQuy(n/2);
}

int main()
{
	int n;
	printf("\nNhap n: "); scanf("%d", &n);

	printf("\nUoc so le lon nhat cua %d la %d", n, deQuy(n));

	getch();
	return 0;
}


Output:
1
Line 17: error: conio.h: No such file or directory


Create a new paste based on this one


Comments: