Write a Program that Inputs Base and Height from the User | C++

Write a Program that Inputs Base and Height from the User | C++ Programming

Write a Program that Inputs Base and Height from the UserIn this useful C++ program I will show in this program that inputs base and height from the user. Write a Program that Inputs Base and Height from the User will make sense to show you how to write a program. This will calculate and displays the area of a triangle by using the formula area= 1/2 *Base *Height. In this short tutorial, I will show you the complete program source code and also provide you the automata of the program. The automata of the program will show you the process of the program.

Q3 write a program that inputs base and height from the user.

It calculates and displays the area of a triangle by using the formula Area = ½ *Base *Height.

Answer.#include<iostream.h>#include<conio.h>// Global variablesInt a;Int b;Int c;Void take data ();Void process data ();Void show data ();Void main (){Take data ();Process data ();Show data ();}Void take data (){Cout <<” inputs the base and height “;}Void process data () {Cout <<”calculate the aria of triangle “;}Void show data () { Cout << “displays the results “;}Automata of the program2 a b c 134a 1’2 = take the inputs from the user .b 2,3 = process .c 3’4 = show data / result1 is the initial state4 is the ending state

Related Articles to check other C++ Programming using automata programs.

Write a program that inputs the Distance traveled and speed of the vehicle

Write a program that inputs two numbers ‘swap values and displays

What is a Programming Language? | Basics of Programming Language

History of Programming languages

is HTML a programming language? | what is HTML?

How to be a Programmer | Easy Ways To Gain Programming Skills

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.