自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(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

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除