为什么报“z"没定义?
#include<stdio.h>#include<stdlib.h>
void main()
{
{
int f(int z);
int a,z,b,d;
printf("" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "欢迎使用宿舍管理系统\n");
printf("" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "输入任意键继续!\n");
printf("" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " ");
getchar();//等待键盘输入//
system("cls");//清屏//
printf("" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "请输入寝室号码,按回车结束!\n");
printf("" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " ");
scanf("%d",&z);//找到切入点,每选择一个数,对应一个子程序,调用子程序//
getchar();
system("cls");//清屏//
printf("" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "请选择您的操作,按回车结束!\n");
printf("1*****写入信息****\n");
printf("2*****查看信息****\n");
printf("" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " );//选择输入1还是2??//
scanf("%d",&b);
f(b);
}
int f(int z);//定义函数//
{
int i=2118;
if(z==i)
{
printf("DFSDF");
}
}
}