这个C语言程序错在哪里啦

来源:百度知道 编辑:UC知道 时间:2024/05/22 13:12:18
#include <stdio.h>
void select(),insert(),update(),delete();
int main()
char op;
printf("\n*********************");
printf("\n* Menu selection *");
printf("\n* 1 Select *");
printf("\n* 2 Insert *");
printf("\n* 3 Update *");
printf("\n* 4 Delete *");
printf("\n* 5 Exit *");
printf("\n*********************");
while (l)
{
printf("\n Please enter selection");
scanf("%c",&op);
switch(op)
{
case'1':select();
break;
case'2':insert(0;
break();
case'3':update();
break;
case'4':delete();
break;
case'5':break;
default:
printf("\n Selection Enor!");
break;
}
if(op=='5'

这个问题很多了
1首先是delete()方法 你不能用这个名字 你要改名
2main后面没有{
3main方法只能调用方法,不能定义方法,
4还有一个break();应该没有()
5while循环里的是1 , 不是l(L)
不说了 给你改好的程序
#include <stdio.h>
void select(),insert(),update(),del();
int main(){
char op;
printf("\n*********************");
printf("\n* Menu selection *");
printf("\n* 1 Select *");
printf("\n* 2 Insert *");
printf("\n* 3 Update *");
printf("\n* 4 Delete *");
printf("\n* 5 Exit *");
printf("\n*********************");
while (1)
{
printf("\n Please enter selection");
scanf("%d",&op);
switch(op)
{
case 1:select();
break;
case 2:insert();
break;
case 3 :update();
break;
case 4 :del();
break;
case 5 :bre