题解列表

筛选

三个数字排序

摘要:解题思路:利用冒泡排序交换的思想,但是只有三个数,没必要用for循环。直接两两比较,三个if即可。注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,t;……

成绩评定-switch用法

摘要:解题思路:主要是switch用法,仔细看看这道题!!!注意事项:参考代码:#include<stdio.h>int main(){ int score; char grade; scanf("%d",……

三个数找最大值

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c; int max; scanf("%d%d%d",&a,&b,&c); max=a; if(……

1058: 二级C语言-求偶数和

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,s=0; scanf("%d",&n); int a[n]; for(int i=0;i<n;i++……

1868: 装包装箱问题

摘要:解题思路: 箱子严格按由大到小装       6- 5-4-3-2-1                                                      &nb

charAt之字符串反转

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args) {……

简单for循环

摘要:解题思路:1、根据对称性,只看前n/2行即可               2、发现奇数行和偶数行的规律                奇数行i/2个*-,结尾i/2个-*   中间全是

一次过 简单栈问题

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ stack<char>q; string s; cin >>……