请问我这哪有问题

P2433 【深基1-2】小学数学 N 合一

nbq202412904430 @ 2024-09-04 21:01:18

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
    int x;
    cin >>x;
    if(x==1)printf("I love Luogu!");
    else if(x==2)printf("%d %d",2+4,10-2-4);
    else if(x==3)printf("%d\n%d\n%d",14/4,14/4*4,14%4);
    else if(x==4)printf("%f",500.0/3);
    else if(x==5)printf("%d",(260+220)/(12+20));
    else if(x==6)cout<<sqrt(6*6+9*9);
    else if(x==7)printf("%d\n%d\n%d",100+10,100+10-20,0);
    else if(x==8)cout<<2*3.141593*5<<endl<<5*3.141593*5<<endl<<125*3.141593*3/4;
    else if(x==9)printf("%d",((2*2+1)*2+1)*2);
    else if(x==10)printf("%d",10);
    else if(x==11)cout<<100/(8-5);
    else if(x==12)printf("%d\nr",14);
    else if(x==13)printf("%d",7);
    else if(x==14)printf("%d",50);
    return 0;
}

by zhangjiahe__ @ 2024-09-04 21:15:39

x=4时保留6位有效数字(166.666)


by zhangjiahe__ @ 2024-09-04 21:18:12

12
输出大写R


by zhangjiahe__ @ 2024-09-04 21:18:59

10用double除


by zhangjiahe__ @ 2024-09-04 21:19:29

*11


by zhangjiahe__ @ 2024-09-04 21:21:00

8直接cout掉精度,用setprecision


by zhangjiahe__ @ 2024-09-04 21:21:40

10,13请自看题解求解


by zhangjiahe__ @ 2024-09-04 21:22:10

@nbq202412904 求关


by nbq202412904430 @ 2024-09-04 22:19:13

@zhangjiahe__ 没看懂


by nbq202412904430 @ 2024-09-04 22:22:17

@zhangjiahe__ 10没看懂,*11什么意思,cout这个用法没学过,不知道setprecision这个怎么用


by zhangjiahe__ @ 2024-09-05 13:15:39

不知道setprecision这个怎么用也可以用printf("%.nf"), n表示小数点后精度


| 下一页