From 42159eeb6f0d7499566070dbba3bac544f9ba7bb Mon Sep 17 00:00:00 2001 From: p62jhspgx <2736273201@qq.com> Date: Sun, 5 Nov 2023 18:41:35 +0800 Subject: [PATCH] ADD file via upload --- t2.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 t2.c diff --git a/t2.c b/t2.c new file mode 100644 index 0000000..835181f --- /dev/null +++ b/t2.c @@ -0,0 +1,25 @@ +#include +typedef struct INFO +{ + int num; + float Maths; + float Physics; + float English; +}Info; +Info stu[3]; +void info(); +int main() +{ + info(); +} +void info() +{ + for (int i = 0; i < 3; i++) + { + scanf("%d%f%f%f", &stu[i].num, &stu[i].Maths, &stu[i].Physics, &stu[i].English); + } + for (int i = 0; i < 3; i++) + { + printf("%d %.1f %.1f %.1f\n", stu[i].num, stu[i].Maths, stu[i].Physics, stu[i].English); + } +} \ No newline at end of file