|
if后面要有(),判断多个条件的时候要用&&(而且)、||(或者)符号连接
而且逻辑好乱
猜了下你的意思,写了个参考程序
[mw_shl_code=c,true]#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c;
printf("输入账号:");
scanf("%d/n",&a);
printf("输入密码:");
scanf("%d/n",&b);
if(a==123456789&&b==123456)
{
printf("输入序号:");
scanf("%d",&c);
if(c==1)
printf("1212");
else if(c==2)
printf("5454");
else
printf("申请错误!");
}
else printf("申请错误!");
system("pause");
return 0;
}[/mw_shl_code]
|
|