Skip to content

Instantly share code, notes, and snippets.

View MrBeerBrewer's full-sized avatar

MrBeerBrewer MrBeerBrewer

View GitHub Profile
@MrBeerBrewer
MrBeerBrewer / gist:0261d6d669f708d348faf1f6f460fc54
Created January 18, 2024 17:24
C program to find area of a triangle given three sides - BCA SEMESTER 1 NEP
#include <stdio.h> //Header file is included for Standard input and output
int main() { //This is where the program execution begins
// Declare variables for the sides of the triangle
float base, height;
// Prompt user for input
printf("Enter the base of the triangle: ");
//Store the value that is entered by the user in base variable %f means type cast it to float
scanf("%f", &base);