Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
55172 | zhangweiran | 期末成绩-二维数组 | C++ | Accepted | 1 MS | 252 KB | 321 | 2024-11-03 09:38:57 |
#include<iostream> #include<cmath> using namespace std; int main() { float a[3][2]; for(int i=0;i<3;i++){ for(int j=0;j<2;j++){ cin>>a[i][j]; } } for(int i=0;i<3;i++){ cout<<a[i][0]+a[i][1]<<" "; } cout<<endl; for(int j=0;j<2;j++){ cout<<round((a[0][j]+a[1][j]+a[2][j])/3.0)<<" "; } }