PTA Zhejiang University edition "C language programming experiment and exercise guidance (3rd edition)" question set (reference answer)

This collection of topics was written by the blogger when he was learning C language. Some of the code may be funny. Do not spray or spray.
The programming questions have been completed, and the function questions are being continuously updated...
Note: The codes of some of the questions are referenced by others.

Programming questions:

Title number Topic name
Experiment 1-1 Hello World!
Experiment 1-2 Welcome to You!
Experiment 1-3 Programming in C is fun!
Experiment 1-4 Output triangle
Experiment 1-5 Output diamond pattern
Experiment 1-6 Output boxed text
Experiment 1-7 What is a computer?
Experiment 1-8 Output inverted triangle pattern
Experiment 2-1-1 Calculate the temperature in Celsius
Experiment 2-1-2 Temperature conversion
Experiment 2-1-3 Calculate the free fall distance of an object
Experiment 2-1-4 Calculate the average score
Experiment 2-1-5 Assign the square of x to y
Experiment 2-1-6 Calculate Fahrenheit temperature
Experiment 2-1-7 The digits of the integer 152
Experiment 2-2-1 Calculate the piecewise function [1]
Experiment 2-2-2 Calculate the temperature in Celsius
Experiment 2-2-3 Calculate deposit interest
Experiment 2-2-4 Calculate the piecewise function [2]
Experiment 2-2-5 Find the integer mean
Experiment 2-2-6 Calculate piecewise function [3]
Experiment 2-2-7 Four arithmetic of integers
Experiment 2-2-8 Tiered price
Experiment 2-2-9 Calculate train running time
Experiment 2-3-1 Find the sum of 1 to 100
Experiment 2-3-2 Find the sum of the first N items of the Nth sequence
Experiment 2-3-3 Find the sum of the first N items in an odd-numbered part of the sequence
Experiment 2-3-4 Find the sum of the first N terms in a simple interleaved sequence
Experiment 2-3-5 Output Fahrenheit-Celsius temperature conversion table
Experiment 2-3-6 Find the sum of the first N terms in the interleaved sequence
Experiment 2-3-7 Find the partial sum of the square and reciprocal sequence
Experiment 2-4-2 Generate 3 power table
Experiment 2-4-3 Find the sum of the first N terms in the square root sequence
Experiment 2-4-4 Find the sum of the first N terms of the factorial sequence
Experiment 2-4-6 Sum of exponentiation
Experiment 2-4-7 Find the number of combinations
Experiment 3-1 Find the roots of a quadratic equation in one unknown
Experiment 3-2 Calculate the value of the sign function
Experiment 3-3 Comparison of size
Experiment 3-4 Statistical characters
Experiment 3-5 Check fruit price
Experiment 3-6 Calculate personal income tax
Experiment 3-7 Statistics of student performance
Experiment 3-8 Output triangle area and perimeter
Experiment 3-9 Three days of fishing and two days of drying the net
Experiment 3-10 Highway speeding penalty
Experiment 3-11 Calculate gas bill
Experiment 4-1-1 Greatest common divisor and least common multiple
Experiment 4-1-2 Find odd sum
实验4-1-3 找出最小值
实验4-1-4 求整数的位数及各位数字之和
实验4-1-5 韩信点兵
实验4-1-6 求分数序列前N项和
实验4-1-7 特殊a串数列求和
实验4-1-8 求给定精度的简单交错序列部分和
实验4-1-9 猜数字游戏
实验4-1-10 兔子繁衍问题
实验4-1-11 高空坠球
实验4-1-12 黑洞数
实验4-2-2 求e的近似值
实验4-2-3 验证“哥德巴赫猜想”
实验4-2-4 换硬币
实验4-2-5 水仙花数
实验4-2-6 输出三角形字符阵列
实验4-2-7 找完数
实验4-2-8 输出整数各位数字
实验4-2-9 梅森数
实验6-1 近似求PI
实验6-8 简单计算器
实验6-9 统计一行文本的单词个数
实验7-1-1 简化的插入排序
实验7-1-2 求最大值及其下标
实验7-1-3 将数组中的数逆序存放
实验7-1-4 找出不是两个数组共有的元素
实验7-1-5 选择法排序
实验7-1-6 求一批整数中出现最多的个位数字
实验7-1-7 查找整数
实验7-1-8 输出数组元素
实验7-1-9 数字加密
实验7-1-10 交换最小值和最大值
实验7-1-11 求整数序列中出现次数最多的数
实验7-1-12 组个最小数
实验7-1-13 装箱问题
实验7-2-1 求矩阵各行元素之和
实验7-2-2 矩阵运算
实验7-2-3 求矩阵的局部极大值
实验7-2-4 计算天数
实验7-2-5 判断上三角矩阵
实验7-2-6 打印杨辉三角
实验7-2-7 方阵循环右移
实验7-2-8 找鞍点
实验7-2-9 螺旋方阵
实验7-2-10 简易连连看
实验7-3-1 字符串逆序
实验7-3-2 查找指定字符
实验7-3-3 统计大写辅音字母
实验7-3-4 字符串替换
实验7-3-5 输出大写英文字母
实验7-3-6 字符串转换成十进制整数
实验7-3-7 字符转换
实验7-3-8 统计字符出现次数
实验7-3-9 字符串字母大小写转换
实验7-3-10 删除重复字符
实验8-1-9 输出学生成绩
实验8-2-1 找最小的字符串
实验8-2-2 找最长的字符串
实验8-2-8 字符串排序
实验8-2-10 IP地址转换
实验9-1 计算职工工资
实验9-2 时间换算
实验9-3 计算平均成绩
实验9-5 查找书籍
实验9-7 找出总分最高的学生
实验9-8 通讯录排序
实验9-9 有理数比较
实验9-10 平面向量加法
实验10-1 圆形体体积计算器
实验11-1-1 英文单词排序
实验11-1-7 藏头诗
实验11-1-9 藏尾诗

函数题

题目号 题目名
实验2-4-1 统计各位数字之和是5的数
实验2-4-5 简单实现x的n次方
实验5-1 使用函数计算两个复数之积
实验5-2 符号函数
实验5-3 使用函数求奇数和
实验5-4 使用函数计算两点间的距离
实验5-5 使用函数求素数和
实验5-6 使用函数判断完全平方数
实验5-7 使用函数求1到10的阶乘和

Guess you like

Origin blog.csdn.net/fjdep/article/details/112433409