欢迎使用本站,预祝练习时长两年半的选手们到成功! [本模块信息来自tem/def/head]
  • [第三章 程序的控制结构] 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;}

    点我呐

  • [第三章 程序的控制结构] 2052:【例3.2】范围判断 日期:2024-05-28 11:35:02 点击:149

    #include iostream#include iomanip#include cmathusing namespace std;int main(){int a;cina;if(a1a100){cout"yes";}return 0;}

    点我呐

  • [第三章 程序的控制结构] 2053:【例3.3】三个数 日期:2024-05-28 11:34:18 点击:69

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

    点我呐

  • [第三章 程序的控制结构] 2054:【例3.4】适合晨练 日期:2024-05-28 11:33:34 点击:198

    #include iostream#include iomanip#include cmathusing namespace std;int main(){double t;cint;if(t=25t=30){cout"ok!";}else {cout"no!";}return 0;}

    点我呐

  • [第三章 程序的控制结构] 2055:【例3.5】收费 日期:2024-05-28 11:32:52 点击:143

    #include iostream#include iomanip#include cmathusing namespace std;int main(){double g;cing;double money=0;if(g20){money=g*1.98;}else{money=g*1.68;}coutfixedsetprecision(2)money;return 0;}

    点我呐

  • [第三章 程序的控制结构] 2056:【例3.7】最大的数 日期:2024-05-28 11:31:55 点击:187

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

    点我呐

  • [第三章 程序的控制结构] 1039:判断数正负 日期:2024-05-28 11:31:12 点击:180

    #include iostreamusing namespace std;int main(){ int n; cinn; if(n0){ cout"positive"; } else if(n0){ cout"negative"; } else{ cout"zero"; } return 0;}

    点我呐

栏目列表
推荐内容
添加管理员微信