Write a Program that Inputs Base and Height from the User | C++ Programming
Write a Program that Inputs Base and Height from the User |
In 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 variables
Void
Void process data ();
Void show data ();
Void main ()
{
Take data ();
Process data ();
Show data ();
}
Void
{
}
Void process data ()
{
}
Void show data ()
{
}
Automata of the program
2 |
1 |
3 |
4 |
1 is the initial state
4 is the ending state
No comments
Note: Only a member of this blog may post a comment.