From 1ed84493cec5f281ad28e8fac3e0b3b3100e7ef9 Mon Sep 17 00:00:00 2001 From: pqfc6e4lh <407900437@qq.com> Date: Sun, 5 Nov 2023 08:49:36 +0800 Subject: [PATCH] ADD file via upload --- 步骤3.cpp | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 步骤3.cpp diff --git a/步骤3.cpp b/步骤3.cpp new file mode 100644 index 0000000..24d39bb --- /dev/null +++ b/步骤3.cpp @@ -0,0 +1,43 @@ +#include +void Input(int b[],float c[],float d[],float e[])/*ÊäÈë³ÌÐò*/ +{ + int i; + for(i=1;i<=3;i++) + scanf("%d%f%f%f",&b[i],&c[i],&d[i],&e[i]); + for(i=1;i<=3;i++) + printf("%d,%.1f,%.1f,%.1f\n",b[i],c[i],d[i],e[i]); +} +int main() +{ + int i; + char a; + int b[1001]; + float c[1001],d[1001],e[1001]; + for(i=1;i<=30;i++) + printf(" "); + printf("1.Input\n"); + for(i=1;i<=30;i++) + printf(" "); + printf("2.Output\n"); + for(i=1;i<=30;i++) + printf(" "); + printf("3.Order\n"); + for(i=1;i<=30;i++) + printf(" "); + printf("4.Quit\n"); + scanf("%c",&a); + if(a=='i') + { + printf("Please input info of the three students:"); + Input(b,c,d,e); +} + else if(a=='o') + printf("You are trying to Output info"); + else if(a=='m') + printf("You are trying to Make things ordered"); + else if(a=='q') + printf("You are about to Quit"); + else + printf("Wrong input"); + return 0; +}