搜索
查看: 285|回复: 1

无法运行。请找出问题。

[复制链接]
 楼主| 发表于 2024-8-1 20:22:46 | 显示全部楼层 |阅读模式
5啊哈币
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4.     int password=5313;
  5.     cout<<"This is miao1.0.password is:";
  6.     cin>>password;
  7.     if(password!=5313){
  8.         cout<<"sorry.wrong.";
  9.         return 0;
  10.     }
  11.     cout<<"miao1.0 is open.";
  12.     return 0;
  13. }

复制代码
报错信息:
Command failed: "D:\AhaCpp\resources\core\bin\gcc.exe" "D:\AhaCpp\resources\code\miaoone.c" -o "D:\AhaCpp\resources\code\miaoone.exe"
D:\AhaCpp\resources\code\miaoone.c:1:24: fatal error: bits/stdc++.h: No such file or directory
compilation terminated.



 楼主| 发表于 2024-8-1 20:47:17 | 显示全部楼层
  1. #include<stdio.h>javascript:;
  2. #include<stdlib.h>

  3. int main(){
  4.     int password;
  5.     printf("This is miao1.0.password is:");
  6.     scanf("%d",password);// 使用%d来读取整数,并且需要提供变量的地址
  7.     if(password!=5313){
  8.         printf("sorry,wrong password");
  9.         return 1;// 返回非零值表示程序异常终止
  10.     }
  11.     printf("miao1.0 is open.");
  12.     return 0;
  13. }


复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

广播台
特别关注
快速回复 返回顶部 返回列表