欢迎使用本站,预祝练习时长两年半的选手们到成功! [本模块信息来自tem/def/head]
  • [第三章 程序的控制结构] 1050:骑车与走路 日期:2024-05-28 11:42:36 点击:107

    #include iostream#include iomanip#include cmathusing namespace std;int main(){//时间=路程/速度+[50]double t1,t2;int s;cins;t1=s/1.2;t2=s/3.0+50;if(t1t2) cout"Walk";else if(t1==t2) cout"All";else cout"Bike";return 0;}

    点我呐

  • [第三章 程序的控制结构] 1051:分段函数 日期:2024-05-28 11:41:56 点击:61

    #include iostream#include iomanip#include cmathusing namespace std;int main(){double x;cinx;double y;if(0=xx5){y=-x+2.5;}else if(5=xx10){y=2-1.5*(x-3)*(x-3);}else{y=x/2-1.5;}coutfixedsetprecision(3)y;return 0;}

    点我呐

  • [第三章 程序的控制结构] 1052:计算邮资 日期:2024-05-28 11:41:20 点击:72

    #include iostream#include iomanip#include cmathusing namespace std;int main(){int a=8;int n;char c;cinnc;if(n1000) {int b=(n-1000)/500;if((n-1000)%500!=0) b+=1;a+=4*b;}if(c=='y') a+=5;couta;return 0;}

    点我呐

  • [第三章 程序的控制结构] 1053:最大数输出 日期:2024-05-28 11:40:33 点击:59

    #include iostream#include iomanip#include cmathusing namespace std;int main(){int a,b,c;cinabc;if(ab) a=b;if(ac) a=c;couta;return 0;}

    点我呐

  • [第三章 程序的控制结构] 1054:三角形判断 日期:2024-05-28 11:40:02 点击:95

    #include iostream#include iomanip#include cmathusing namespace std;int main(){int a,b,c;cinabc;if(a+bca+cbb+ca){cout"yes";}else{cout"no";}return 0;}

    点我呐

  • [第三章 程序的控制结构] 1055:判断闰年 日期:2024-05-28 11:39:31 点击:135

    #include iostream#include iomanip#include cmathusing namespace std;int main(){int a;cina;if(a%4==0a%100!=0||a%400==0){cout"Y";}else{cout"N";}return 0;}

    点我呐

  • [第三章 程序的控制结构] 1056:点和正方形的关系 日期:2024-05-28 11:38:52 点击:63

    #include iostream#include iomanip#include cmathusing namespace std;int main(){int x,y;cinxy;if(x=-1x=1y=-1y=1){cout"yes";}else{cout"no";}return 0;}

    点我呐

  • [第三章 程序的控制结构] 1057:简单计算器 日期:2024-05-28 11:38:12 点击:80

    #include iostream#include iomanip#include cmathusing namespace std;int main(){int a,b;char c;cinabc;switch(c){case '+':couta+b;break;case '-':couta-b;break;case '*':couta*b;break;case '/':if(b==0) cout"Divided by zero!";else couta/b;break;d

    点我呐

  • [第三章 程序的控制结构] 1058:求一元二次方程 日期:2024-05-28 11:37:52 点击:181

    #include iostream#include iomanip#include cmathusing namespace std;int main(){coutfixedsetprecision(5);double a,b,c;cinabc;double x=b*b-4*a*c;if(x0) cout"No answer!";else if(x==0){cout"x1=x2="-b/(2*a);}else{double x1=(-b+sqrt(x))/(2*a);doub

    点我呐

  • [第三章 程序的控制结构] 2051:【例3.1】偶数 日期:2024-05-28 11:35:36 点击:58

    #include iostream#include iomanip#include cmathusing namespace std;int main(){int a;cina;if(a%2==0){cout"yes";}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=...

添加管理员微信