This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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); |
OlderNewer