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];
}
}
}
プログラミングの課題ができない.....
1デフォルトの名無しさん
2022/01/23(日) 19:13:36.64ID:OL1qjUHQ2デフォルトの名無しさん
2022/01/23(日) 19:14:04.18ID:OL1qjUHQ 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];
}
}
}
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:19.99ID:OL1qjUHQ 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";
}
}
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";
}
}
4デフォルトの名無しさん
2022/01/23(日) 19:15:03.19ID:zZngphyI 死ね
5デフォルトの名無しさん
2022/01/23(日) 19:15:09.81ID:OL1qjUHQ 上にはったコードで
| 10| 20| 30|
| 100| 200| 300|
|1000|2000|3000|
を作りたいんですが.....
| 10| 20| 30|
| 100| 200| 300|
|1000|2000|3000|
を作りたいんですが.....
2022/01/23(日) 19:49:11.69ID:aJeJ+Shs
どうしたん?
おじさん話聞こうか?
おじさん話聞こうか?
2022/01/23(日) 20:06:52.79ID:VsHz4rZ3
オジサン、今ムラムラしてるんだよ?
分かるよね?
分かるよね?
8デフォルトの名無しさん
2022/01/24(月) 00:32:55.22ID:7gZW+FH0 >>5
Rustだとこうかな
use itertools::Itertools;
fn main() {
(1..=3).for_each(|p| println!("|{}|", (1..=3).map(|n| 10_i32.pow(p) * n).join("|")));
}
各行(横)が10のp乗でpが1から3で、まずfor_eachする
各列(縦)がそのn倍でnが1から3で、10のp乗にnを掛けて"|"で繋いでprintする
このリンクのRust公式のコード実行ページで『Run』ボタンを押せば実行結果を確認できるよ
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=6d5ee091528ea7182b074a4932d931a1
Rustだとこうかな
use itertools::Itertools;
fn main() {
(1..=3).for_each(|p| println!("|{}|", (1..=3).map(|n| 10_i32.pow(p) * n).join("|")));
}
各行(横)が10のp乗でpが1から3で、まずfor_eachする
各列(縦)がそのn倍でnが1から3で、10のp乗にnを掛けて"|"で繋いでprintする
このリンクのRust公式のコード実行ページで『Run』ボタンを押せば実行結果を確認できるよ
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=6d5ee091528ea7182b074a4932d931a1
2022/01/27(木) 00:32:58.22ID:ZssFv+Jd
Outputに全部計算させるな
計算が必要ならCalcでも導入しろ
計算が必要ならCalcでも導入しろ
2023/10/01(日) 14:24:59.87ID:aBVSdgA0
(メ▼Д▼)y=~~~。o ○プハ~~
2024/06/08(土) 18:30:38.46ID:CrKotUIg
生成AIに依存し過ぎると人間はバカになるのか?実験が明らかにした、生成AIを賢く使える人、使えない人(JBpress)
ttps://news.yahoo.co.jp/articles/e834375b012a7dc57eaab2e8f4875d480d4edc31
ttps://news.yahoo.co.jp/articles/e834375b012a7dc57eaab2e8f4875d480d4edc31
レスを投稿する
ニュース
- 小野田紀美・経済安保担当相「何か気に入らないことがあればすぐに経済的威圧をする国への依存はリスク」 ★2 [Hitzeschleier★]
- 【中国局長】両国関係に「深刻な影響」 首相発言の撤回要求 [蚤の市★]
- 【インバウンド】中国人観光客の日本での消費額は年間約2兆円超…中国政府は公務員の出張取り消し [1ゲットロボ★]
- 外務省局長は無言で厳しい表情…日中の高官協議終了か 高市首相“台湾”発言で中国が強硬対応 発言撤回求めたか…★3 [BFU★]
- 【維新】吉村知事「中国人観光客だけに頼るビジネスモデル変えていかないといけない」「高市総理の発言は撤回する必要はない」 [Hitzeschleier★]
- 【社会】40代以上のおじさん・おばさんは叩いてオッケーという風潮はなぜ加速したのか [七波羅探題★]
- 自分に自信がない女の子、陽キャ美容室で80cmのエクステを付けた結果wwwwwwwwwwwwwwwwwww [329329848]
- 【高市速報】日本人の3割「中国への武力行使に踏み切る必要がある」ANN世論調査 [931948549]
- 外務省局長、よくわからないまま帰国へ [834922174]
- 【実況】博衣こよりのえちえち歌枠🧪
- 【朗報】外務省局長、中国側の要求を断固拒否。「高市さんの答弁は日本政府の立場を変えるものではないし、撤回しない」 [519511584]
- 農林水産省「春頃にはコメ価格落ち着くのでは」新米の取引価格、過去最高を更新。 [256556981]
