- 博客(2)
- 问答 (2)
- 收藏
- 关注
原创 C语言程序 距离最近
编程输入正整数N(N<100),再输入N个整数存入数组,再输入一个整数X,输出N个整数中与X距离最近的第一个数。整数的距离可定义为差的绝对值。(请使用指针技术) #include <stdio.h> #include <stdlib.h> #include<math.h> //1417 int main() { int n,i,t=0; scanf("%d",&n); int a[n]; for(i=0; i<n; i++) scanf("%d",&a
2021-12-09 14:14:36
4274
3
原创 蓝桥杯基础练习 字符串对比
#include <stdio.h> #include <string.h> int main() { char str1[10],str2[10]; scanf("%s",str1); scanf("%s",str2); if(strlen(str1) != strlen(str2)) printf(“1”); else { if(strcmp(str1,str2) == 0) printf(“2”); else if(strcasecmp(str1,str2) == 0) pri
2021-12-09 11:21:03
490
空空如也
为什么我的Printlist输出最后一行是数字乱码啊🥹
2022-04-07
初学者入门程序写法 求指点
2021-10-03
TA创建的收藏夹 TA关注的收藏夹
TA关注的人