![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM
weixin_43983814
这个作者很懒,什么都没留下…
展开
-
第四题
这题有给答案,也是最简单的一题。唯一的难点是怎么表示多行输入后多行输出。有想过用循环让结果返回,可是没有成功,从这道题学到while的妙用,也不亏了 #include<iostream> using namespace std; int main() { double A,B ; while(cin>>A>>B) { cout<<A+B...原创 2018-12-07 17:13:53 · 78 阅读 · 0 评论 -
第8题
#include<iostream> using namespace std; int main() { int a,b; While(cin>>a>>b) if((a+b)%86==0) cout<<"Yes"<<endl; else cout<<"No"<&a原创 2018-12-07 17:18:41 · 164 阅读 · 0 评论 -
第七题
虽然c++从c中发展来的,但是觉得这种情况c中printf("%0.Mf",a); /*将M改为你想保留的几位小数 */更好表示 在这里插入代码片 ```#include<iostream> #include <iomanip> using namespace std; #define PI 3.1415927 double volume(double radius...原创 2018-12-07 18:21:33 · 99 阅读 · 0 评论 -
第6题
这题考察排序,我采用冒泡排序,用数组来存要输入的字符;刚开始我一时好奇用来cin.get 来输入字符,后来发现我还要想办法取消空格符,自找麻烦。还有两个数比较交换时,我忘记加&了,结果只交换了形参。额,以后要记得地址交换和引用交换 #include using namespace std; #include <stdio.h> void swap(char &x,ch...原创 2018-12-07 21:21:08 · 159 阅读 · 0 评论 -
acm第一次考试题目重写
#include<iostream> using namespace std; int main() { int M; cin>>M; double A,B,C; for(int i=0;i<M;i++) { cin>>A>>B>>C; if(A+B>C&&A+C>B&原创 2018-12-10 00:07:47 · 118 阅读 · 0 评论