#include"stdio.h"
#include"conio.h"
void main();
{
int i,number,total,top_number;
clrser();
for (i=1; i<80;i++) printf("*");
gotoxy(20,4);printf("Input numder of N :=");scanf("%d",&top_number);
do {
total = total + number;
number = number + 1;
} while(number<=top_number);
gotoxy(20,5);printf("Total of number 1-N =%d",total);printf("\n");
for(i=1;i<80;i++)printf("*");
gotoxy(20,7);printf("- Press < any Key > to end program - \n");
for (i=1; i<80;i++) printf("*");
getch();
มัน compile ทำไงครับ
ช่วยแก้โปรแกรมคอมพิวเตอร์นี้หน่อยครับ
#include"conio.h"
void main();
{
int i,number,total,top_number;
clrser();
for (i=1; i<80;i++) printf("*");
gotoxy(20,4);printf("Input numder of N :=");scanf("%d",&top_number);
do {
total = total + number;
number = number + 1;
} while(number<=top_number);
gotoxy(20,5);printf("Total of number 1-N =%d",total);printf("\n");
for(i=1;i<80;i++)printf("*");
gotoxy(20,7);printf("- Press < any Key > to end program - \n");
for (i=1; i<80;i++) printf("*");
getch();
มัน compile ทำไงครับ