File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#include<iostream>
2+
#include<cmath>
3+
using namespace std;
4+
5+
int main()
6+
{
7+
// Try out your code here
8+
int a,b,c,d,s,area;
9+
cin>>a>>b>>c;
10+
s=(a+b+c)/2;
11+
d=s*(s-a)*(s-b)*(s-c);
12+
area=sqrt(d);
13+
cout<<"Area of a triangle = "<<area<<endl;
14+
int temp,r,sum=0;
15+
temp=area;
16+
while(area>0){
17+
r=area%10;
18+
sum=sum*10+r;
19+
area=area/10;
20+
}
21+
if (temp==sum)
22+
{
23+
cout<<"Area is palindrome";
24+
}
25+
else
26+
{
27+
cout<<"Area is not palindrome";
28+
}
29+
30+
31+
return 0;
32+
}

0 commit comments

Comments
 (0)