回覆列表
  • 1 # fstpa4116

    編寫一個C程式,執行時輸入a,b,c三個值,輸出其中值最大者的步驟:1、首先輸入三個數,求三個數中的最大值#include<stdio.h>int main(){ int max(int x,int y,int z); int a,b,c,m; scanf("%d,%d,%d",&a,&b,&c); m=max(a,b,c); printf("the max number is %d\n",m); return 0;}2、然後輸入int max(int x,int y,int z){ int max2(int a,int b); int temp,result; temp=max2(x,y); result=max2(temp,z);return(result);}3、最後輸入int max2(int a,int b){ int q; if(a>b)q=a; else q=b; return(q);}即可。

  • 中秋節和大豐收的關聯?
  • 那首歌裡有:我想你明白,無限鴛鴦無限天?