誰でもこのコードで私を助けることができますか? compare_all_min ()
とで使用する引数がわかりませんcompare_all_max ()
。私のコードは次のとおりです。
while (count <= 10) {
minimum = getMin ( item [count] );
maximum = getMax ( item [count] );
printf ( "Minimum is %d\n", &min );
pritnf ( "Max: %d\n", &max );
count++;
}
printf ( "Displaying summary:\n" );
least_num = compare_all_min ( ); //what argument do I
greatest_num = compare_all_max ( ); //use on these two?
printf ( "The least number contained by the array is: %d\n", &least_num );
printf ( "The greatest number contained by the array is: %d\n", &greatest_num );
while ループが出力する最小数が 10 で最大数が 10 であるため、特にどの引数を使用すればよいかわかりません。注:基本的にcompare_all_min ( )
は、while ループで取得される 10 個の最小値すべてを比較してそれらの値の最小値を取得しcompare_all_max ( )
、10 個の最大値すべてを比較してそれらの数値の最大値を取得します。どうもありがとう。