Application to count the number of possible triangles, Visual Basic Programming

A triangle is equilateral if all three sides are equal, isosceles if any two (but no more than two) sides are equal, and scalene if no two sides are equal. A triangle will be inputted by the user by stating the three sides. The program should classify the triangle, and keep count of the number of each type of triangle.

In particular, for each iteration, first obtains the measurements of a triangle from the user. The prompt should be:

Please enter the three sides of the triangle on separate lines. Enter '-1' to quit. This should be followed by the classification of the triangle, such as:

25

5

25

The triangle is isosceles.

When the user terminates input (by entering a '-1', print out the following summary:

End of Processing.

The number of equilateral triangles was XX

The number of isosceles triangles was XX

The number of scalene triangles was XX

Structured programming must be used. In particular,

(1) Use a subprogram to prompt and obtain all the input for a single triangle from a user.

(2) Use a subprogram to determine the type of triangle based on the user input, and to update your running totals of each triangle type.

Use a pre-test loop for your processing in Main (with a priming read). Build both a C# and Visual basic Program.

Run them both using the following data for the triangle data to enter (each value on a separate line):

10.1 5 10.1

10 5.23 15

4 4 4

5.2 10 10

20.2 20.2 4.1

3 4 5

 Print the source code for each program version on a separate page, and attach the output using screen capture.

NOTE:

1. Terminate the use-input portion of the program ONLY if user enters -1 for the first side. A -1 for side 2 or side 3 should not terminate the user input.

2. You do not need to check for negative values for a triangle side. Assume all sides entered are positive values (unless the first side is a -1 to end).

3. Assume the sides entered are for an actual triangle

4. Do NOT use/change global variables - use parameter-passing

Posted Date: 2/21/2013 1:41:03 AM | Location : United States







Related Discussions:- Application to count the number of possible triangles, Assignment Help, Ask Question on Application to count the number of possible triangles, Get Answer, Expert's Help, Application to count the number of possible triangles Discussions

Write discussion on Application to count the number of possible triangles
Your posts are moderated
Related Questions
Describe different validation controls of VB.net?

- I have the chapter 5 project completed already. This is due tomorrow. Modify the Very Very .Boards project from Chapter 5 to separate the user interface from the business logic.

ILLUSTRATION OF MDI APPLICATION USING A PROJECT 1. Choose the MDI option while generating the project by using the Appwizard. 2. Add the WM_LBUTTONDOWN message for the view

Case: Design a web page that contains the VBScript utilized for calculating subtotals, taxes, discounts & totals as well as code utilized to validate use

GENETICS 1.         The branch genetics started in 1900 after rediscovery of Mendel's work. 2.         Gregor Johann Mendel is called Father of genetics. 3.         The t

Variable Length Strings: The Strings can be declared using As or $ as shown in the code below; the msg and msg1 are the two strings and they are assigned the values using '='.

You can exit a Do...Loop using the Exit Do statement. Since usually you desire to exit only in certain situations, such as to ignore an endless loop, you should employ the Exit Do

MDI Application: The MDI application utilizes the main frame window as the work space in which the user can open more document frame windows.

I am having a hard time with calculating APY in my project. Every time I run the program my second APY is blank.

You are asked to create the LOTO game customized according to the following constraints: 1. Create a grid containing 20 numbers (20 buttons: button1, button2, …button20) 2. When t