RT,请各位看我的程序,帮我纠正一下,谢谢.
#include"conio.h"
#include"stdio.h"
#include"math.h"
void win()
{clrscr(); textbackground(7);
window(20,5,60,20); clrscr(); }
char menu()
{ char c,a;
win(); textcolor(14); clrscr();
scnaf("%c",&a);
gotoxy(9,6); cprintf("1 addclienr");
gotoxy(9,7); cprintf("2 searchclient");
gotoxy(9,8); cprintf("3 stimulated");
gotoxy(9,9); cprintf("4 tongji");
gotoxy(9,10); cprintf("5 printallclients");
gotoxy(9,11); cprintf("6 exit");
gotoxy(15,14); textcolor(128+14);
cprintf("choose");
c=getch(); return(c);
menu1(a);
}
main()
{ char k;
textmode(7);
textmode(3);
menu: k=menu();
switch(k)
{ case '1':addclient();break;
case'2':searchclient();break;
case'3':stimulate();break;
case'4':tongji();break;
case'5':printallclients();break;
case'6':exit();
}
goto menu;
}
addclient()
{printf("a");}
searchclient()
{printf("b");}
stimulate()
{printf("c");}
tongji()
{printf("d");}
printallclients()
{printf("e");}
menu1()
{char ch;
scanf("%c",&ch);
getchar();
if(ch<'1'||ch>'9')
switch(ch)
{
case '1':
addclient();
getchar();
break;
case '2':
searchclient();
getchar();
break;
case '3':
stimulate();
getch();
break;
case '4':
tongji();
getchar();
break;
case '5':
printallclients();
break;
case '6':
exit();
getch();
break;
return ch;
}
}