自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 收藏
  • 关注

原创 [C语言]练习题

Write a program to sort the ten integers in ascending order by Bubble sort algorithm or Exchange Maximum sort (select) algorithm, use the Binary search algorithm to search the number(recursive), and then if the data doesn¡¯t exist, insert it into the array

2020-06-09 10:55:49 193

原创 [C语言]倒序输出字符串

要求:键入"I am student",输出"student am I"。 思路:将字符串写入数组,再倒序输出。 #include <stdio.h> void order(char* str[]) { int j; for (j = 4; j >= 0; j--) { printf_s("%s ", str[j]); } } void main() { char s[5][10]; ...

2020-06-04 08:17:02 2645

原创 [C语言]计算中整型与浮点型的转换

我想写一个计算平均数的函数,但计算结果总是不对。 program: float average(int* n[]) { int i; int sum = 0; float average; for (i = 0; i < 10; i++) { sum = sum + n[i]; } average = sum / (float)10; printf_s("\n平均值为:%f", average...

2020-06-02 10:01:30 7727

原创 [C语言]从文件中读取单词并按字典序排序

思路: 1.根据冒泡排序,编写sort函数,用于单词排序; 2.在main函数中读取文件中单词到二维数组,再利用指针,最后代入函数。 遇到问题: 1.字符数组和字符串数组混淆; 2.代码没有问题,但就是无法运行。但当把警告等级设置为“完全不警告”,SDL检查设置为“否”后,代码即可顺利运行。 代码: #include<stdio.h> #include<string.h> void sort(char** s) { char* str; i...

2020-05-26 11:13:59 4232

空空如也

空空如也

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

TA关注的人

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