[编程入门]带参数宏定义练习(C++)(简单易懂) 摘要:解题思路:思路主要为将两个数值交换,需要一个中间量搭建桥梁,不难想到交换赋值语句(t)注意事项:宏定义时参数要有“桥梁”,即t参考代码:#include<iostream>using namespac…… 题解列表 2021年11月14日 0 点赞 0 评论 901 浏览 评分:9.9
特殊的数字四十 摘要:解题思路:注意事项:参考代码:for i in range(1000,10000): a = str(i) b= 0 for j in a: b +=int(j) …… 题解列表 2021年11月14日 0 点赞 0 评论 752 浏览 评分:0.0
特殊的数字四十 摘要:解题思路:注意事项:参考代码:for i in range(1000,10000): a = str(i) b= 0 for j in a: b +=i…… 题解列表 2021年11月14日 0 点赞 0 评论 378 浏览 评分:0.0
蓝桥杯基础练习-数列排序 摘要:n=int(input())if n>=1 and n<=200: sl=list(map(int,input().split())) for i in sorted(sl): …… 题解列表 2021年11月14日 0 点赞 0 评论 702 浏览 评分:9.0
题解 1777: 循环练习之完美数判断 摘要:#include<stdio.h> int main() { int a=1; int b=0; int X; scanf("%d", &X);//输入数字…… 题解列表 2021年11月14日 0 点赞 0 评论 467 浏览 评分:9.9
题解 1010: [编程入门]利润计算 摘要:#include <stdio.h> int main() { int benefit, bonus//建变量 scanf("%d", &benefit); if (benefi…… 题解列表 2021年11月14日 0 点赞 0 评论 293 浏览 评分:0.0
易懂比较简单(c语言)。 摘要:解题思路:两次循环一次找完数,一次输出因子。注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d",&n); for(…… 题解列表 2021年11月14日 0 点赞 0 评论 619 浏览 评分:0.0
实数的打印 摘要:解题思路:主要是理解”6.2f“格式,这是个占位符,f表示float类型,6表示输出的数字占六位,数字向右靠齐。2表示精确到小数点后两位。注意事项:不要忘了“用空格分隔同一行的数字"这一要求参考代码:…… 题解列表 2021年11月14日 0 点赞 0 评论 683 浏览 评分:0.0
这题的描述有毛病:结尾有空格才对,没有空格会报错。 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define N 21int uf(long b[],int m,int n){ int t; if(m<n/2){ t=b[m]; …… 题解列表 2021年11月13日 0 点赞 0 评论 484 浏览 评分:0.0
c++分段函数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ double x; cin>>x; if(x<0){ pr…… 题解列表 2021年11月13日 0 点赞 0 评论 622 浏览 评分:5.0