计算三角形周长


package zzz;

import javax.swing.JOptionPane;


public class llyytt {

 
 public static void main(String[] args) {
  // TODO Auto-generated method stub
//  String [] aa;
   String aa=JOptionPane.showInputDialog(null,"Input a number","梁燕婷",JOptionPane.QUESTION_MESSAGE);
   int aa1=Integer.parseInt(aa);
   String bb=JOptionPane.showInputDialog(null,"Input a number","梁燕婷",JOptionPane.QUESTION_MESSAGE);
   int bb1=Integer.parseInt(bb);
   String cc=JOptionPane.showInputDialog(null,"Input a number","梁燕婷",JOptionPane.QUESTION_MESSAGE);
   int cc1=Integer.parseInt(cc);
  if(aa1+bb1
   JOptionPane.showMessageDialog(null,"ERROR!!!","梁燕婷",JOptionPane.QUESTION_MESSAGE );
  else
   JOptionPane.showMessageDialog(null,aa1+bb1+cc1,"梁燕婷",JOptionPane.QUESTION_MESSAGE );
  }  

 }

posted on 2012-12-07 22:50  木本  阅读(188)  评论(0编辑  收藏  举报

导航