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

To generate a PDF using JavaScript in Oracle APEX from a collection

  To generate a PDF using JavaScript in Oracle APEX from a collection, you can follow these steps: 1. Create a button or link on your APEX p...