应该行数算少然后比较清晰了 摘要:解题思路:调用sscanf函数注意事项:参考代码:#include <stdio.h>#include <string.h>#include <stdlib.h>int is_ip(char *ip_…… 题解列表 2024年10月29日 0 点赞 0 评论 623 浏览 评分:9.9
汽水瓶:第二种解法 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ int n,b,a,m,j=0; while(scanf("%d",&n…… 题解列表 2024年10月28日 1 点赞 0 评论 393 浏览 评分:2.0
可以在输入的时候同时统计最大最小值 摘要:```c #include int main(){ int n; scanf("%d",&n); int arr[n]; int max=0,min=0,…… 题解列表 2024年10月28日 0 点赞 0 评论 493 浏览 评分:0.0
用结构体数组和qsort排序 先给字符串排序,然后使用结构体数组来存储出现过的字母,同时统计同一字符出现过的次数,因为已经排好序了,所以很容易统计。在统计的时候顺便把最大次数找出来,之后遍历结构体数组找最大次数就行了。```c#include#include#include#defineMAX1001//定义最大输入长度typed 题解列表 2024年10月28日 0 点赞 0 评论 566 浏览 评分:9.9
把数字转换成字符串,这样就好处理了 思路很简单,运用sprintf函数把数字转换成字符,这样年就是数组下标0-3,月就是4-5,日就是6-7,然后判断一下是不是回文就行了。```c#include#include#include//检查日期是否为回文intfun(intn){chararr[9];//定义字符数组用于存储日期sprint 题解列表 2024年10月28日 2 点赞 0 评论 621 浏览 评分:9.9
球弹跳高度的计算(小白专用,不要技巧,好理解) 摘要:解题思路:按照小球运动状态;注意事项:虽然路程需要*2;但是参考代码通过一次循环嵌套实现;参考代码:#include<math.h>int main(){ int i = 1; double m=0,…… 题解列表 2024年10月28日 0 点赞 0 评论 726 浏览 评分:9.9
1986: 鸡兔同笼(c语言) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int i, x, y, z; scanf("%d", &z); for (y = 0; y…… 题解列表 2024年10月28日 1 点赞 0 评论 630 浏览 评分:10.0
用函数来完成甲流病人初筛 摘要:解题思路:先定义用于筛选的函数体,再在主函数中进行调用注意事项:函数体中,数值是不能够直接进行传递的,如果想传递到主函数中,要用指针参考代码:#include <stdio.h> voi…… 题解列表 2024年10月27日 0 点赞 0 评论 640 浏览 评分:9.9
1038: [编程入门]宏定义练习之三角形面积 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#define F(a,b,c) S=(a+b+c)/2#define P(a,b,c) area=sq…… 题解列表 2024年10月27日 2 点赞 0 评论 1414 浏览 评分:10.0
1025 数组插入处理 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define N 9 void insert(int* arr,int n,int value) //定义一个插入…… 题解列表 2024年10月27日 0 点赞 0 评论 444 浏览 评分:9.9