[ create a new paste ] login | about

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

C, pasted on Sep 14:
#include<stdio.h>
#include<conio.h>
#include<string.h>
char hoten [30];
int toan;
int van;
float DiemTrungBinh;

void Nhap()
{
	fflush(stdin);
	printf("\nNhap ho ten: ");
	gets(hoten);

	printf("\nNhap toan: ");
	scanf("%d", &toan);

	printf("\nNhap van: ");
	scanf("%d", &van);
}

void XuLy()
{
	DiemTrungBinh = (toan + van) / 2.0;
}

void Xuat()
{
	printf("\nHo ten: %s", hoten);
	printf("\nToan: %d", toan);
	printf("\nVan: %d", van);
	printf("\nDiem Trung Binh: %f", DiemTrungBinh);
}
int main()
{
	Nhap();
	XuLy();
	Xuat();

	getch();
	return 0;
}


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


Create a new paste based on this one


Comments: