Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Tuyệt Kỹ Đong Giai Chân Kinh (tuyệt Kỹ cua trai)
Thu Aug 23, 2012 5:38 am by Admin

» Tuyệt kỹ cua giai
Thu Aug 23, 2012 5:36 am by Admin

» NETCAT.........
Mon Aug 13, 2012 6:35 am by Admin

» Bảo mật CSDL bằng phương pháp mã hóa.
Tue Apr 17, 2012 10:04 pm by Admin

» Hàm mã hóa MD5 bằng JavaScript
Tue Apr 17, 2012 10:03 pm by Admin

» Giá của món quà
Fri Apr 13, 2012 6:01 am by Admin

» Sẽ chỉ yêu ai?
Fri Apr 13, 2012 6:01 am by Admin

» Cách đọc bảng chữ cái!
Thu Apr 12, 2012 10:37 pm by Admin

» Gắn trojan, keylog, virus vào website, forum
Tue Apr 10, 2012 1:14 am by Admin

Shopmotion


Affiliates
free forum


Ham kiem tra tam giac

View previous topic View next topic Go down

Ham kiem tra tam giac

Post  Admin on Thu Feb 10, 2011 8:06 am

Code:
void KiemTraTG(TG k)
   {   
      
      double AB=DD(k.aPoint,k.bPoint);
       double BC=DD(k.bPoint,k.cPoint);
       double AC=DD(k.aPoint,k.cPoint);
       //System.out.println("AB: " + AB + " BC: " + BC + " AC: " + AC);
       if(AB+BC<=AC || BC+AC<=AB || AB+AC<=BC || AB<=0 ||AC<=0 ||BC<=0)
       {
          System.out.println("3 diem vua nhap k phai la tam giac");
       }
       else
       {
          System.out.println("3 diem vua nhap la tam giac ");
       }
   }
avatar
Admin
Admin

Tổng số bài gửi : 782
Join date : 2009-08-15

View user profile http://hackis.forumotion.com

Back to top Go down

Ham tinh chu vi dien tich tam giac

Post  Admin on Thu Feb 10, 2011 8:11 am

Code:
public double ChuVi(TG k)
   {
      double AB=DD(k.aPoint,k.bPoint);
       double BC=DD(k.bPoint,k.cPoint);
       double AC=DD(k.aPoint,k.cPoint);
       double kq=AB+BC+AC;
       return (kq);
   }
   public double DienTich(TG k)
   {
      double AB=DD(k.aPoint,k.bPoint);
       double BC=DD(k.bPoint,k.cPoint);
       double AC=DD(k.aPoint,k.cPoint);
       double p=ChuVi(k)/2;
       double kq=Math.sqrt((p-AB)*(p-AC)*(p-BC)*p);
       return (kq);
   }
avatar
Admin
Admin

Tổng số bài gửi : 782
Join date : 2009-08-15

View user profile http://hackis.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum