-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnested if...else.c
More file actions
44 lines (40 loc) · 914 Bytes
/
Copy pathnested if...else.c
File metadata and controls
44 lines (40 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include<stdio.h>
int main()
{
int a,b,c;
printf("Enter the sides:\n");
scanf("%d\n%d\n%d",&a,&b,&c);
if(a+b>c && b+c>a && c+a>b)
{
printf("This will be a Triangle.\n");
if(a==b && b==c)
{
printf("This triangle is equilateral.\n");
}
else
{
printf("This triangle is not equilateral.\n");
}
if(a==b || b==c || c==a)
{
printf("This triangle is isosceles.\n");
}
else
{
printf("This triangle is not isosceles.\n");
}
if(a!=b&&b!=c&&c!=a)
{
printf("This triangle is scalene.\n");
}
else
{
printf("This triangle is not scalene.\n");
}
}
else
{
printf("This will not be a triangle.\n");
}
return 0;
}