Maximum score in 4 variable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Budiman
    New Member
    • Nov 2006
    • 21

    Maximum score in 4 variable

    Hey Friends, Ineed your help in finishing my assignment.
    I need help where the input number for A, B, C, D.
    The assignmnet is how to decide where is the maximum from those 4 variables.
    I think its easy enough for you all.
    Thx for your attention and your help
  • greek
    New Member
    • Nov 2006
    • 17

    #2
    U have to assign one of the variables to be the maximum then u compare it with the remaining 3 variables

    Comment

    • greek
      New Member
      • Nov 2006
      • 17

      #3
      by using functions:
      here is the statement
      void max(int a,int b,int c,int d)
      {max_val=a;
      if (b>max_val)
      max_val=b;
      if (c>max_val)
      max_val=c;
      if (d>max_val)
      max_val=d;
      }

      Comment

      • Budiman
        New Member
        • Nov 2006
        • 21

        #4
        Can you give the complete program, if possible can you please explain it.
        i think that program can't work.

        Comment

        • Budiman
          New Member
          • Nov 2006
          • 21

          #5
          oo i Understand it already thx for your help

          Comment

          Working...