欢迎使用本站,预祝练习时长两年半的选手们到成功! [本模块信息来自tem/def/head]
  • [第三章 程序的控制结构] 1057:简单计算器 日期:2024-05-27 15:43:01 点击:163

    #include iostreamusing namespace std;int main() {int a,b;char c;cinabc;if(int(c)==43) couta+b;else if(int(c)==45) couta-b;else if(int(c)==42) couta*b;else if(int(c)==47b!=0) couta/b; else if(int(c)==47b==0) cout"Divided by zero!";else cout"

    点我呐

  • [第三章 程序的控制结构] 1056:点和正方形的关系 日期:2024-05-27 15:42:34 点击:195

    #include bits/stdc++.husing namespace std;int main(){ int x,y; cinxy; if(x=-1x=1y=-1y=1) cout"yes"; else cout"no"; return 0;}

    点我呐

  • [第三章 程序的控制结构] 1055:判断闰年 日期:2024-05-27 15:42:13 点击:53

    #include bits/stdc++.husing namespace std;int main(){ int x; cinx; if(x%4==0x%100!=0||x%400==0) cout"Y"; else cout"N"; return 0;}

    点我呐

  • [第三章 程序的控制结构] 1054:三角形判断 日期:2024-05-27 15:41:51 点击:90

    #include bits/stdc++.husing namespace std;int main(){ int a,b,c; cinabc; if(ab) swap(a,b); if(ac) swap(a,c); if(b+ca) cout"yes"; else cout"no"; return 0;}

    点我呐

  • [第三章 程序的控制结构] 1053:最大数输出 日期:2024-05-27 15:41:30 点击:97

    #include iostreamusing namespace std;int main(){int a,b,c;cinabc; if(a=ba=c){couta;}else if(b=ab=c){coutb;}else if(c=bc=a){coutc;} return 0;}

    点我呐

  • [第三章 程序的控制结构] 1052:计算邮资 日期:2024-05-27 15:41:07 点击:74

    #include iostreamusing namespace std;int main(){ int a=0,c=0; char b; cinab; if(b == 'y') { if(a = 1000) { cout"13"; } else { if(a%500 != 0) { c = 13+((((a-1000)/500)+1)*4); coutc; } else { c = 13+(((a-1000)/500)*4); coutc; } } } else if(b

    点我呐

  • [第三章 程序的控制结构] 1051:分段函数 日期:2024-05-27 15:40:44 点击:92

    #include bits/stdc++.husing namespace std;int main(){ double n; cinn; if(n=0n5){ printf("%.3lf",2.5-n); } else if(n=5n10){ printf("%.3lf",2-1.5*(n-3)*(n-3)); } else if(n=10n20){ printf("%.3lf",n/2-1.5); } return 0;}

    点我呐

  • [第三章 程序的控制结构] 1050:骑车与走路 日期:2024-05-27 15:40:19 点击:125

    #include bits/stdc++.husing namespace std;int main(){ double x; cinx; double a,b; b=x/1.2; a=x/3+50; if(ab) cout"Walk"; else if(ab) cout"Bike"; else cout"All"; return 0;}

    点我呐

  • [第三章 程序的控制结构] 1049:晶晶赴约会 日期:2024-05-27 15:39:54 点击:54

    #include iostreamusing namespace std;int main(){ int a; cina; switch(a){ case 1: case 3: case 5: cout"NO"; break; default: cout"YES"; } return 0;}

    点我呐

  • [第三章 程序的控制结构] 1048:有一门课不及格的学生 日期:2024-05-27 15:39:30 点击:126

    #include iostreamusing namespace std;int main(){ int a,b; cinab; if(a=60b60||a60b=60){ cout1; } else{ cout0; } return 0;}

    点我呐

栏目列表
推荐内容
  • 1340:扩展二叉树

    #include iostream#include queueusing namespace std;struct node{char c;node *left,...

  • 1243:月度开销

    #include iostreamusing namespace std;int n,m;long long a[100050];long long l=0,r=...

添加管理员微信