[ create a new paste ] login | about

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

C, pasted on Dec 1:
#include<stdio.h>
#include<conio.h>

struct HonSo
{
	int Tu;
	int Mau;
	int Nguyen;
};
typedef struct HonSo HONSO;

void NhapHonSo(HONSO &);
void XuatHonSo(HONSO);

void NhapHonSo(HONSO &hs)
{
	printf("\nNhap nguyen: ");
	scanf("%d", &hs.Nguyen);

	printf("\nNhap tu so: ");
	scanf("%d", &hs.Tu);

	printf("\nNhap mau so: ");
	scanf("%d", &hs.Mau);
}

void XuatHonSo(HONSO hs)
{
	printf("%d(%d/%d)", hs.Nguyen, hs.Tu, hs.Mau);
}

int main()
{
	HONSO hs;
	NhapHonSo(hs);
	XuatHonSo(hs);

	getch();
	return 0;
}


Output:
1
2
3
Line 17: error: conio.h: No such file or directory
Line 12: error: expected ';', ',' or ')' before '&' token
Line 15: error: expected ';', ',' or ')' before '&' token


Create a new paste based on this one


Comments: