[ create a new paste ] login | about

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

C, pasted on Apr 26:
#include<stdio.h>
#include<conio.h>
#include<Windows.h>
int main()
{
	/*int i = 1;
	Taideptrai:
	printf("%d\n", i);
	i++;

	if (i <= 10)
	{
		goto Taideptrai;
	}*/

	int n;
	Taideptrai2:
	printf("\nNhap vao so nguyen duong n: ");
	scanf_s("%d", &n);

	if (n < 0)
	{
		printf("\nGia tri n phai la so duong. Xin kiem tra lai! ");
		goto Taideptrai2;
	}

	printf("\nDu lieu da hop le !");
	printf("\nBan co muon tiep tuc chuong trinh hay khong ? Neu co thi nhan phim C, nguoc lai nhan phim bat ky de thoat ra !");

	char t = _getch();
	if (t == 'c' || t == 'C')
	{
		system("cls");
		goto Taideptrai2;
	}

	_getch();
	return 0;
}


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


Create a new paste based on this one


Comments: