the program is working without error and also giving the correct answear but it it has not a pass testing . please help me out .

public class Solution
{
    public static int min(int a, int b, int c, int d)
    {
        min(a,b);
        min(a,b);
        min(a,b);
        int m = 0 ;
        if (a>b) m = b ;
        else if (a<b) m = a ;
        int m2 = 0 ;
        if (c<d) m2 = c ;
        else if (c>d) m2 = d ;
        int x = 0 ;
        if (m < m2) x = m ;
        else if (m > m2) x = m2 ;
        return x ;
    }
    public static int min(int a, int b)
    {
        int result = 0 ;
        if (a>b) result = b ;
        else if (a<b) result = a ;
        return result ;
    }
    public static void main(String[] args) throws Exception
    {
        System.out.println( min(-20, -10) );
        System.out.println( min(-20, -10, -30, -40) );
        System.out.println( min(-20, -10, -30, 40) );
    }
}

asked 13 Mar '15, 17:20

Muhammad%20Hassan%20Durrani's gravatar image

Muhammad Has...
4311224
accept rate: 0%

closed 13 Mar '15, 17:31

Elleonora%20Carry's gravatar image

Elleonora Carry ♦♦
275

you cpied mine code here . if you got the answear then let me know too

(18 Mar '15, 10:43) Muhammad Has...

The question has been closed for the following reason "http://help.javarush.net/questions/140/level02lesson08task04" by Elleonora Carry 13 Mar '15, 17:31

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×67
×51
×16

Asked: 13 Mar '15, 17:20

Seen: 832 times

Last updated: 18 Mar '15, 10:43