accept the degrees of an angle .determine the type of angle and display it
#include<stdio.h>
void angle_types(int angle){
if (angle==90){
printf("Right Angle");
}
else if(angle < 90){
printf( "Acute Angle");
}
else if(angle>90 && angle<180){
printf("Obtuse Angle");
}
else if(angle==180){
printf("Straight Angle");
}
else if(angle>180){
printf("Reflex Angle");
}
else if(angle ==360){
printf("Full Rotation");
}
}
int main(){
int angle;
printf("Enter an angle:\t");
scanf("%d", &angle);
angle_types(angle);
}
Comments
Leave a comment