From 43853996d2ef164dc6bf6852dcabe372d2f069c1 Mon Sep 17 00:00:00 2001 From: pk29n3fu4 <2434647226@qq.com> Date: Fri, 22 Nov 2024 17:12:43 +0800 Subject: [PATCH] ADD file via upload --- cs2.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 cs2.cpp diff --git a/cs2.cpp b/cs2.cpp new file mode 100644 index 0000000..f82b6f8 --- /dev/null +++ b/cs2.cpp @@ -0,0 +1,26 @@ +#include + int main() + {int s[3]; + float m[3],w[3],t[3],e[3]; + s[0] = 10001; + m[0] = 85.0; + w[0] = 99.0; + e[0] = 77.5; + s[1] = 10002; + m[1] = 88.5; + w[1] = 88.5; + e[1] = 90.0; + s[2] = 10003; + m[2] = 66.0; + w[2] = 78.5; + e[2] = 89.5; + for(int i=0;i<3;i++) + { + t[i]=m[i]+w[i]+e[i]; + } + for(int i=0;i<3;i++) + {printf("%d %.1f %.1f %.1f %.1f\n",s[i],m[i],w[i],e[i],t[i]); + } + return 0; + } +