c++ find the column number(index) that have maximum sum of it's elementsYou task is to find the column number(index) that have maximum sum of it's elements.InputFirst line N and M (1
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/08 15:11:09
c++ find the column number(index) that have maximum sum of it's elementsYou task is to find the column number(index) that have maximum sum of it's elements.InputFirst line N and M (1
c++ find the column number(index) that have maximum sum of it's elements
You task is to find the column number(index) that have maximum sum of it's elements.
Input
First line N and M (1
c++ find the column number(index) that have maximum sum of it's elementsYou task is to find the column number(index) that have maximum sum of it's elements.InputFirst line N and M (1
#include
#include
using namespace std;
int main(){
int n;
int m;
cin>>n>>m;
int* array = new int[m*n];
int i,j;
for(i=0; i>array[i];
int max = -1;
int col = 1;
for(j=0; j