#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
main()
{
char name[25];
char conn;
start:
printf("What is your name?: ");
scanf("%s",&name);
printf("\n\n\n\n");
print("********************************\n");
printf("Hello %s \n",name);
printf("********************************\n'');
again;
printf("Do you want again? [y/n] : ")
con = getch();
if ((con =='y')||(con=='Y'))
{
system("cls");
goto start;
}
e1se
{
if ((con=='n')||(con=='N'))
{
system("cls");
printf("Goodbye!!!!");
getc();
}
else
{
print("\n");
goto again;
}
}
}
ช่วยแก้โปรแกรมภาษาซี หน่อยสิค้ะ
#include <stdlib.h>
#include <conio.h>
main()
{
char name[25];
char conn;
start:
printf("What is your name?: ");
scanf("%s",&name);
printf("\n\n\n\n");
print("********************************\n");
printf("Hello %s \n",name);
printf("********************************\n'');
again;
printf("Do you want again? [y/n] : ")
con = getch();
if ((con =='y')||(con=='Y'))
{
system("cls");
goto start;
}
e1se
{
if ((con=='n')||(con=='N'))
{
system("cls");
printf("Goodbye!!!!");
getc();
}
else
{
print("\n");
goto again;
}
}
}