public class test2 {

    public static void main(String[] args) {
        // TODO Auto-generated method stub
                              int  a=5,b=6,c=7;    
        if(a>b&&a>c){
        
        System.out.println("最大值为:"+a);
        
        }else{
            System.out.println("最大值为:"+c);
        }                                
                    
        if(a<b&&a<c){
            
            System.out.println("最小值为:"+a);
            
            }else{
                System.out.println("最小值为:"+c);
                                        }               

    }


}

 

posted on 2017-06-21 15:22  动手不吵吵的程序员  阅读(370)  评论(0编辑  收藏  举报