Home /
Expert Answers /
Computer Science /
implement-a-c-program-that-calculate-the-area-of-a-triangle-feel-free-to-use-any-c-compiler-for-exa-pa722
(Solved): Implement a C program that calculate the area of a triangle. Feel free to use any C compiler for exa ...
Implement a C program that calculate the area of a triangle. Feel free to use any C compiler for example Visual Studio for C, Xcode, or any online compiler.
Implement a C program that calculate the area of a triangle. Feel free to use any C compiler for example Visual Studio for C, Xcode, or any online compiler. Online compiler lists: 1. GDB online Debugger \( G \) 2. Replit \( G \) 3. ideone \( G \) Instructions: 1. Declare two integer variable for the base and the height. 2. Prompt a user for the base. 3. Get the user input and store it in the variable base 4. Prompt a user for the height. 5. Get and store the user input to the variable height. 6. Calculate the area of the triangle (base* height)/2 7. Output the triangle area to the console
Please complete the \( \mathrm{C} \) programming below: \#include int main( ) \{ int int height; printf("Welcome to an area of triangle calculator!"); printf("\nPlease insert a whole number for a base:"); scanf("\%d", \&base); \[ \text { ("\nPlease insert a whole number for a height: "); } \] double result \( = \) (base* height);