查看匯總:2014年上半年計算機(jī)二級C語言上機(jī)模擬試題匯總
填空題
請補(bǔ)充main函數(shù),該函數(shù)的功能是:從鍵盤鍵盤輸入3個整數(shù)然后找出最大的數(shù)并輸出。
例如,輸入:12 45 43,輸出為45
注意:部分源程序給出如下。
僅在橫線上填入所編寫的若干表達(dá)式或語句,勿改動函數(shù)中的其他任何內(nèi)容。
試題程序:#include
#include
main()
{
int a, b, c, max;
printf("\nInput three numbers:\n");
scanf("%d,%d,%d", &a, &b, &c);
printf("The three numbers are:%d,%d,%d\n", a, b, c);
if (a > b)
___1___;
else
___2___;
if (max < c)
___3___;
printf("max=%d\n", max);
}
第1處填空:max=a
第2處填空:max=b
編輯推薦:
2014年上半年計算機(jī)等級考試報名時間預(yù)告
2014年計算機(jī)等級考試考試時間預(yù)測
2013年9月計算機(jī)等級考試成績查詢時間及方式預(yù)告