We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 210a4ff commit d816394Copy full SHA for d816394
Array/Problems/43 Area of triangle and check paindrome.cpp
@@ -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