Write a program, which accept the arm of triangle and print the Area and perimeter of it in C.



#include<conio.h>
#include<stdio.h>
void main()
{
   int side1,side2,base,hieght,perimeter,area;
   printf("Enter the 1st arm = ");
   scanf("%d",&side1);
   printf("Enter the 2nd arm = ");
   scanf("%d",&side2);
   printf("Enter the base or 3rd arm = ");
   scanf("%d",&base);
   perimeter=side1+side2+base;
   area=(base*perimeter);
   printf("Perimeter is = %d",perimeter);
   printf("Area is = %d",area);
getch();
}

OUTPUT :- 
Previous Post
Next Post