亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長(zhǎng)資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    c語言怎么輸入3個(gè)數(shù)輸出最大值

    方法:首先使用scanf()接收從鍵盤輸入的三個(gè)數(shù);然后使用“if else”語句比較三個(gè)數(shù)的大小,獲得最大值;最后使用print()函數(shù)將最大值輸出即可。

    c語言怎么輸入3個(gè)數(shù)輸出最大值

    本教程操作環(huán)境:windows7系統(tǒng)、c99版本、Dell G3電腦。

    c語言輸入3個(gè)數(shù)輸出最大值

    #include <stdio.h> int main() {     // 輸入abc輸出最大值     int a;     int b;     int c;     int max;     scanf("%d %d %d", &a, &b, &c); // 輸入請(qǐng)空格隔開最后回車     /* if (a > b) {         max = a;     } else {         max = b;     } */     max = a;     if (b > max) {         max = b;     }     if (c > max) {         max = c;     }     printf("%dn", max);     return 0;     }

    運(yùn)行:

    c語言怎么輸入3個(gè)數(shù)輸出最大值

    贊(0)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)