[ create a new paste ] login | about

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

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

struct Diem
{
	float x;
	float y;
};

typedef struct Diem DIEM;

void NhapDiem(DIEM &);
void XuatDiem(DIEM);

void NhapDiem(DIEM &d)
{
	float temp;
	printf("\nNhap x: ");
	scanf("%f", &temp);
	d.x = temp;

	printf("\nNhap y: ");
	scanf("%f", &temp);
	d.y = temp;
}

void XuatDiem(DIEM d)
{
	printf("(%8.3f, %8.3f)", d.x, d.y);
}

int main()
{
	DIEM d;
	NhapDiem(d);
	XuatDiem(d);

	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: