小白也能看懂
2026-04-13 21:53:11
发布于:上海
88阅读
0回复
0点赞
保姆级教程,小白也能看懂!!!
首先写入头文件
#include <bits/stdc++.h>
using namespace std;
int main(){
return 0;
}
然后创建变量n,这里注意n必须是double类型而不是float
#include <bits/stdc++.h>
using namespace std;
int main(){
double n;
return 0;
}
接下来需要输入n的数值,也就是cin>>
#include <bits/stdc++.h>
using namespace std;
int main(){
double n;
cin>>n;
return 0;
}
接着需要判断n>or=3.1415926,这里采用if else 语句
#include <bits/stdc++.h>
using namespace std;
int main(){
double n;
if(n > 3.1415926){
}
else{
}
return 0;
}
最后输出yes or no
#include <bits/stdc++.h>
using namespace std;
int main(){
double n;
if(n > 3.1415926){
cout<<"yes";
}
else{
cout<<"no";
}
return 0;
}
最后是完整的,方便直接抄
#include <bits/stdc++.h>
using namespace std;
int main(){
double n;
if(n > 3.1415926){
cout<<"yes";
}
else{
cout<<"no";
}
return 0;
}
喜欢就点赞哦!
全部评论 3
143532y4tvb45t45ct4t73t785tc54ctb37xry7tb54t8754t785vty758yt5ctb548cty54t87yvt78byt85t834cyb8ty8vyy1
4天前 来自 云南
0少cin >> n;了

2026-06-29 来自 江苏
0cin>>n;
2026-06-29 来自 江苏
0








有帮助,赞一个