C++代码宏定义闰年判断 摘要:解题思路:四年一闰;百年不闰,四百年再闰if ((y%4==0) and (y%100!=0) or (y%400==0)) cout<<'L'<<endl;else cout<<&#…… 题解列表 2021年12月28日 0 点赞 0 评论 294 浏览 评分:0.0
C++代码带实参宏定义 摘要:解题思路:#define s(a,b,c) ((a+b+c)/2)#define area(a,b,c,s) sqrt(s(a,b,c)*(s(a,b,c)-a)*(s(a,b,c)-b)*(s(a,…… 题解列表 2021年12月28日 0 点赞 0 评论 323 浏览 评分:0.0
C++宏定义求余数 摘要:解题思路:#define remainder a%b注意事项:暂时不明参考代码:#include<iostream>#include<string>using namespace std;#defin…… 题解列表 2021年12月28日 0 点赞 0 评论 538 浏览 评分:0.0
C++代码带参宏定义的使用 摘要:解题思路:关于带参宏定义的使用https://blog.csdn.net/liufuchun111/article/details/84285629注意事项:暂时不明参考代码:#include<ios…… 题解列表 2021年12月28日 0 点赞 0 评论 609 浏览 评分:6.0
c++处理,利用do-while循环解决 摘要:解题思路:(1)先想好怎么计算出位数?利用do-while循环指令,将输入的数分别除以十,得到余数和商,判断商是否为0;不是0则继续循环; do { b[i] = a % 10; a…… 题解列表 2021年12月28日 0 点赞 0 评论 688 浏览 评分:0.0
C++代码string库函数,输入空格终止问题,采用getline 摘要:解题思路:https://www.cnblogs.com/Alan-kx/p/14320284.html读取空格终止导致for循环无法遍历全字符串问题注意事项:暂时不明参考代码:#include<io…… 题解列表 2021年12月28日 0 点赞 0 评论 449 浏览 评分:0.0
C++代码 for循环 求余 整除 数组保存每位数值 逆序输出 摘要:解题思路:for循环 求余 整除 数组保存每位数值 逆序输出注意事项:暂时不明参考代码:#include<iostream>using namespace std;int main(){ int…… 题解列表 2021年12月28日 0 点赞 0 评论 794 浏览 评分:0.0
C++string库,for循环,if判断元音,char数组 摘要:解题思路:string库,for循环,if判断元音,char数组注意事项:暂时不明参考代码:#include<iostream>#include<string>using namespace std;…… 题解列表 2021年12月28日 0 点赞 0 评论 1064 浏览 评分:0.0
C++代码String库函数,for循环,索引 摘要:解题思路:for循环,索引注意事项:暂时不明参考代码:#include<iostream>#include<string>using namespace std;int main(){ stri…… 题解列表 2021年12月27日 0 点赞 0 评论 329 浏览 评分:0.0
C++代码,使用string库 摘要:解题思路:逆序输出字符串for (int i=str.length()-1;i>=0;i--) cout<<str[i];注意事项:暂时不明参考代码:#include<iostream>#includ…… 题解列表 2021年12月27日 0 点赞 0 评论 251 浏览 评分:0.0