第15届蓝桥杯C/C++B组好数求解 解题思路:is_good_number函数检查一个数是否为好数。它从最低位开始检查,奇数位置必须是奇数,偶数位置必须是偶数。如果所有位置都满足这个条件,则返回1表示这是一个好数,否则返回0。参考代码:#include#include//函数用于检查一个数是否为好数in 题解列表 2024年09月22日 3 点赞 0 评论 1048 浏览 评分:10.0
c语言 小白上路 回文数 摘要:解题思路: 利用调用函数使主函数更加简洁。注意事项: ◆调用函数写在主函数前面,或者在主函数中对需要调用的函数进行声明;◆函数可能有些臃肿,建议自己再进行修正。▓参考代码:#include…… 题解列表 2024年09月21日 0 点赞 0 评论 717 浏览 评分:9.9
编写题解 1044: [编程入门]三个字符串的排序 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>void fun(char a[3][100]) { char temp[100]; …… 题解列表 2024年09月21日 0 点赞 0 评论 489 浏览 评分:0.0
编写题解 1031: [编程入门]自定义函数之字符串反转 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char a[30]; scanf("%s",a); fo…… 题解列表 2024年09月21日 0 点赞 0 评论 546 浏览 评分:0.0
编写题解 1032: [编程入门]自定义函数之字符串连接 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void connect(char a[],char b[]){ int i,j=0; while(a[i]!=0)…… 题解列表 2024年09月20日 0 点赞 0 评论 539 浏览 评分:9.9
编写题解 1025: [编程入门]数组插入处理 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void fun(int a[9],int n){ int i,j; for(i=0;i<9;i++){ if…… 题解列表 2024年09月20日 0 点赞 0 评论 374 浏览 评分:0.0
写题解 1011: [编程入门]最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int gcd(int a,int b){ int temp; while(b!=0){ int temp =…… 题解列表 2024年09月20日 0 点赞 0 评论 354 浏览 评分:0.0
编写题解 1023: [编程入门]选择排序 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void fun(int a[10]){ int temp; for(int i=0;i<9;i++){ fo…… 题解列表 2024年09月20日 0 点赞 0 评论 614 浏览 评分:0.0
编写题解 1049: [编程入门]结构体之时间设计 摘要:解题思路:注意事项:参考代码:#include <stdio.h>// 定义日期结构体struct Date { int year; int month; int day;};// …… 题解列表 2024年09月20日 0 点赞 0 评论 525 浏览 评分:0.0
题解 2854: 字符串的输入以及条件判断 解题思路:对输入字符串的每个元素进行判断,如果该字符为A~Y或a~y,则输出其下一个字符串;如果该字符为z或Z,则输出a或A注意事项:scanf函数对含空格的字符串的读取有限制,只会读到空格之前,对空格后的字符无法读取,回存在缓存区中,所以使用getchar函数来读取字符参考代码:#include 题解列表 2024年09月19日 0 点赞 0 评论 688 浏览 评分:9.9 « 12...192193194195196197198...29562957 »