วันพุธที่ 1 ตุลาคม พ.ศ. 2551

การเขียนโปรแกรมภาษา C เมื่อสัปดาห์ที่แล้ว
ข้อที่ 2 (repeven.CPP)

วิธีทำ

#include
void main()
{
int n,i;
clrscr();
printf("num=:"); scanf("%d",&n);
for (i=2;i<=n; i+=2){printf("%d\t",i);
}
printf("\n-----------------end of file--------------------");
getch();
}

ไม่มีความคิดเห็น: