當前位置:編程學習大全網 - 電腦編程 - C語言編程,輸入任意三個數n1,n2,n3,求其中最大的壹個數。

C語言編程,輸入任意三個數n1,n2,n3,求其中最大的壹個數。

# include <stdio.h>

int main(void)

{

int i, j, h, max1,max2;

printf("請輸入三個數(中間以空格隔開):\n");

scanf("%d %d %d", &i, &j, &h);

max1=i>j?i:j;

max2=max1>h?max1:h;

printf("最大的數=%d\n",max2);

return 0;}

希望對妳有幫助 求最佳

  • 上一篇:平板電腦 能 用 ps 嗎? 能 練習 C語言嗎?
  • 下一篇:判斷系統的能控性 能觀性
  • copyright 2024編程學習大全網