|
- #include<iostream>
- using namespace std;
- int sz,sy;
- float r,b;
- int main()
- {
- r=10/2/3.14;
- sy=r*r*3.14;
- b=10/4;
- sz=b*b;
- if (sz<sy) cout<<"y is bigger than z";
- else cout<<"z is bigger than y ";
- return 0;
- }
- #include<iostream>
- #include<cmath>
- using namespace std;
- float cz,cy;
- int main()
- {
- cz=sqrt(10)*4;
- cy=sqrt(10/3.14)*2*3.14;
- if (cz>cy) cout<<"cz is bigger";
- else cout<<"cy is bigger";
- return 0;
- }
复制代码 |
|