[ create a new paste ] login | about

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

C, pasted on Jun 20:
#include"VeXemPhim.h"

void NhapVe(VEXEMPHIM &ve)
{
	/*fflush(stdin);
	printf("\nNhap vao ma ve: ");
	gets(ve.MaVe);*/

	fflush(stdin);
	printf("\nNhap vao ten rap: ");
	gets(ve.Rap);

	fflush(stdin);
	printf("\nNhap vao ten phim: ");
	gets(ve.TenPhim);

	do 
	{
		printf("\nNhap vao gia ve: ");
		scanf("%f", &ve.GiaBan);

		if (ve.GiaBan < 0)
		{
			printf("\nGia ve khong hop le. Xin kiem tra lai !");
		}

	} while (ve.GiaBan < 0);

	printf("\nNhap vao gio chieu: ");
	NhapGio(ve.GioChieu);
	printf("\nNhap ngay chieu: ");
	NhapNgay(ve.NgayChieu);
}

void XuatVe(VEXEMPHIM ve)
{
	printf("\nMa ve: %s",ve.MaVe);
	printf("\nRap: %s", ve.Rap);
	printf("\nTen phim: %s", ve.TenPhim);
	printf("\nGia ban: %f", ve.GiaBan);
	printf("\nNgay chieu: ");
	XuatNgay(ve.NgayChieu);
	printf("\nGio chieu: ");
	XuatGio(ve.GioChieu);
}


Output:
1
2
3
Line 21: error: VeXemPhim.h: No such file or directory
Line 3: error: expected ')' before '&' token
Line 35: error: expected ')' before 've'


Create a new paste based on this one


Comments: