Monday, April 18, 2022

Write a program that calculates the area of a circle and triangle

Area of a triangle

#include<stdio.h>

int main()

{

      //Area of a triangle = 0.5*base*height     

       float base, height, area;

       printf("Enter the base and height value : ");

       scanf("%f %f", &base, &height);

 

       area = 0.5*base*height;

       printf("Area of Triangle is: %.2f",area);

       return (0);

}

 

No comments:

Post a Comment

How to install and configure Oracle Apex 24.1 with ORDS 22, Tomcat 9 and Jasper Report 7 on Oracle Linux 8.10

#########################Install Oracle  APEX 24.1################################ ----------------------------------------------------...