Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Right Triangle Coding using C

#include <stdio.h>

int main()
{
 int angA, angB, angC;

 
angA = 30;  angB = 90; angC = 60;

if((angA + angB + angC) == 180)
{ 
printf("This is a Triangle\n");

if(angA == 90 )
{ 
 printf("Right Triangle has been found with angle A being 90 degrees.\n");
}

else
if(angB == 90)
{
printf("Right Triangle has been found with angle B being 90 degrees.\n");
}

else
if(angC == 90)
{
printf("Right Triangle has been found with angle c being 90 degrees.\n");
}
else
{
printf("This is not a Right Triangle\n");
}
}

else
{
printf("This is not a Triangle\n");
}
 
 
 

}

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.