摘要:
本题要求实现一个计算复数之积的简单函数。 函数接口定义: struct complex multiply(struct complex x, struct complex y); 其中struct complex是复数结构体,其定义如下: struct complex{ int real; int 阅读全文
posted @ 2021-05-11 20:12
ekertree
阅读(736)
评论(0)
推荐(0)
摘要:
5-2 下列程序读入时间数值,将其加1秒后输出,时间格式为:hh: mm: ss,即“小时:分钟:秒”,当小时等于24小时,置为0。 #include <stdio.h> struct { int hour,minute,second; }time; int main(void) { scanf(" 阅读全文
posted @ 2021-05-11 19:55
ekertree
阅读(368)
评论(0)
推荐(0)
摘要:
5-1 输入一个正整数n,再输入n个学生的姓名和百分制成绩,将其转换为两级制成绩后输出。要求定义和调用函数set_grade(stu, n),其功能是根据结构数组stu中存放的学生的百分制成绩score,将其转换为两级制成绩,并赋给grade。百分制成绩到两级制成绩的转换规则:大于或等于60分为P, 阅读全文
posted @ 2021-05-11 19:34
ekertree
阅读(900)
评论(0)
推荐(1)

浙公网安备 33010602011771号