C++遇到瓶颈实在解不出来

如题,想请问各位程设大师们,目前在学二维 & 多维的向量,但实在是不太理解如何做题
第二题的部分有事着做一些,但还是解不太出来
第三题是真的不知无从下手
附上题目与程式码
感谢各位大神~
http://img2.58codes.com/2024/20145630HHGNf7gM1f.png
http://img2.58codes.com/2024/20145630wZvg50xON6.png
以上是题目的图片

#include <iostream>using namespace std ;double StuAvg (double a[x]);double ProAvg (double b[][]);double CompAvg (double c[][]);int main (){double score[512][2];int i=0,j=0,x,y;for(i=0;i<512;i++){cout << "input程设与计概成绩\n";for(j=0;j<2;j++){ cin >> x; if(x<0){ cin >> y; }else{ score[i][j]=x; }}while (x<0 && y<0)break;}StuAvg (score[i][j]);return 0;}double StuAvg (double a[x][y]);{double sum=0;for(int a=0;a<x;x++){cout << "the student"<<x+1<<" pro average is";for(int b=0;b<y;b++){sum+=a[x][y]}cout << sum/2;}}

以上是第二题的程式码


关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章