kiem tien, kiem tien online, kiem tien truc tuyen, kiem tien tren mang
Saturday, March 21, 2015

‪#‎include‬ <stdio.h>
#include <onio.h>
bool KiemTraTamGiac (int a, int b, int c)
{
if (a+b >c && b + c > a && a +c >b)
return true;
return false;
}
void LoaiTamGiac (int a, int b, int c)
{
if (a*a + b*b == c*c || a*a + c*c == b*b || c*c + b*b == a*a)
{
printf ("\nDay la tam giac vuong ");
}
else printf ("\nDay la tam giac thuong");
}
int main ()
{
int a,b,c;
printf ("\nNhap do dai 3 canh cua tam giac : \n");
scanf ("%d%d%d",&a,&b,&c);
KiemTraTamGiac (a,b,c);
if (KiemTraTamGiac (a,b,c)== true)
{
LoaiTamGiac (a,b,c);
}
else
printf ("\nDo dai 3 canh vua nhap khong phai la 3 canh cua mot tam giac");
getch ();
return 0;
}
Download

0 comments:

Post a Comment

domain, domain name, premium domain name for sales

Popular Posts