C语言 三个数的排序 程序我采用if语句来实现相关的功能,有点繁琐。首先判断出最大值,然后在剩下的两个数中在判断。#includeintmain(){inta,b,c,min,mid,max;scanf("%d%d%d",&a,&b,&c);if(a>=b&&a>=c){max=a;if(b>=c)mid=b;min=c; 题解列表 2021年03月29日 0 点赞 0 评论 615 浏览 评分:0.0
可以用字符串数组的形式写 摘要:解题思路:通过字符串的形式可以直接得出长度,在者通过转换输出的方法可以直接得出想要的顺序。注意事项:需要特别注意的是字符串数组的长度不小于五,因为题目要求小于等于五位数。参考代码:#include <…… 题解列表 2021年03月29日 0 点赞 0 评论 466 浏览 评分:0.0
王牌花色的题解 解题思路:注意事项:在字符串的输入中,注意用getchar()函数接收enter键值,enter键作为输入结束的标志,当前输入结束时,会保存在寄存器中,若下一条语句仍然为输入字符,则这个enter键值便作为字符输入,我们真正输入的字符则没有被存储进我们需要的变量。 题解列表 2021年03月29日 0 点赞 0 评论 872 浏览 评分:0.0
字符逆序——交换 摘要:解题思路:本质字符数组元素交换注意事项:s[strlen(s)-i-1]这里得减一参考代码:#include<stdio.h>#include<string.h>int main(){ char…… 题解列表 2021年03月29日 0 点赞 0 评论 905 浏览 评分:0.0
斐波那锲数 摘要:解题思路:注意事项:参考代码:package VIP题库;import java.util.Scanner;/* * 斐波纳契数列 1,1,2,3,5,8,13,21,34,55,89……这个数列则称…… 题解列表 2021年03月29日 0 点赞 0 评论 674 浏览 评分:9.9
题解 1461: FJ的字符串(递归) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<string> using namespace std; string s; char a[28]="AB…… 题解列表 2021年03月29日 0 点赞 0 评论 529 浏览 评分:0.0
NICE!简简单单 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void main(){ int score,grade;while((scanf("%d",&score))!=EOF){ grade…… 题解列表 2021年03月30日 0 点赞 0 评论 582 浏览 评分:0.0
NICE!简简单单 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void main(){ int score,grade;while((scanf("%d",&score))!=EOF){ grade…… 题解列表 2021年03月30日 0 点赞 0 评论 649 浏览 评分:9.9
运用string巧妙解决 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ string s; while(cin>>s) { …… 题解列表 2021年03月30日 0 点赞 0 评论 535 浏览 评分:0.0
蓝桥杯基础练习VIP-报时助手 摘要: #include using namespace std; string nums[]={"zero","one","two","three","four","five",…… 题解列表 2021年03月30日 0 点赞 0 评论 680 浏览 评分:0.0