プログラミングの課題ができない..... (11レス)
上下前次1-新
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん
リロード規制です。10分ほどで解除するので、他のブラウザへ避難してください。
1: 2022/01/23(日)19:13 ID:OL1qjUHQ(1/4) AAS
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: 2022/01/23(日)19:14 ID:OL1qjUHQ(2/4) AAS
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: 2022/01/23(日)19:14 ID:OL1qjUHQ(3/4) AAS
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";
}
}
5(1): 2022/01/23(日)19:15 ID:OL1qjUHQ(4/4) AAS
上にはったコードで
| 10| 20| 30|
| 100| 200| 300|
|1000|2000|3000|
を作りたいんですが.....
上下前次1-新書関写板覧索設栞歴
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ
ぬこの手 ぬこTOP 0.016s