- #include<stdio.h>javascript:;
- #include<stdlib.h>
- int main(){
- int password;
- printf("This is miao1.0.password is:");
- scanf("%d",password);// 使用%d来读取整数,并且需要提供变量的地址
- if(password!=5313){
- printf("sorry,wrong password");
- return 1;// 返回非零值表示程序异常终止
- }
- printf("miao1.0 is open.");
- return 0;
- }
复制代码 |