Most efficient way to find the greatest of three ints

前端 未结 14 1250
离开以前
离开以前 2020-12-30 07:58

Below is my pseudo code.

function highest(i, j, k)
{
  if(i > j && i > k)
  {
    return i;
  }
  else         


        
14条回答
  •  难免孤独
    2020-12-30 08:44

    public int maximum(int a,int b,int c){
        int max = a;
        if(b>max)
            max = b;
        if(c>max)
            max = c;
        return max;
    }
    

提交回复
热议问题