プログラミングの課題ができない.....at TECHプログラミングの課題ができない..... - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト1:デフォルトの名無しさん 22/01/23 19:13:36.64 OL1qjUHQ.net void DataInput(int arry[][100], int& row, int& column); void FormatOutput(int arry[][100], int row, int column); int main(){ int array[100][100],x,y; DataInput(array, y, x); FormatOutput(array, y, x); } void DataInput(int arry[][100], int& row, int& column){ cin >> row; cin >> column; for(int i=0; i<row; i++){ for(int j=0; j<column; j++){ cin >> arry[i][j]; } } } 2:デフォルトの名無しさん 22/01/23 19:14:04.18 OL1qjUHQ.net void FormatOutput(int arry[][100], int row, int column){ int ulutoramanmax=0, mizuzane, kuukyo,swap,soutasan; for(int i=0; i>row; i++){ for(int j=0; j>column; i++){ if(ulutoramanmax <= arry[i][j]){ ulutoramanmax = arry[i][j]; } } } 3:デフォルトの名無しさん 22/01/23 19:14:19.99 OL1qjUHQ.net for(int s=1; s<=100; s++){ ulutoramanmax = ulutoramanmax/10; if(ulutoramanmax<1){ mizuzane = s; break; } } for(int a=0; a<row; a++){ cout << "|"; int num = arry[0][a]; for(int c=1;c<100;c++){ num = num * 100; if(num<0){ soutasan = c; } } kuukyo = mizuzane - soutasan; for(int b=0; b<row; b++){ for(int d=0; d<kuukyo; d++){ cout << " "; } cout << arry[a][b] << "|"; } cout << "\n"; } } 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch