Results 1 to 4 of 4

Thread: simple way of comparing different integers

Hybrid View

  1. #1
    Join Date
    Jun 2014

    simple way of comparing different integers

    hi all..

    is there any easy way of comparing diff integers ? like

    i have four int a=1,b=4,c=1,d=9;

    and if i use if else it will be long way is there any sort ways of doing these ?

    i need something like



    //a is greater


    else if(b>a&&b>c&&b>c)


    //b is greater


    else if(a==b&&a>c&&a>d)


    //a and b are equal


    else if(a==b&&a==c&&a>d)


    //a,b and c are equal





    can anyone can help me with this please?

  2. #2
    Join Date
    Jun 2014
    This is the best method to solve and compare the integers......

  3. #3
    Stick 'em in an array, and use Array.Sort

  4. #4
    Great and informative method dear.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center