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

Assignment Help:

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


Related Discussions:- Application to count the number of possible triangles

Program for add integers from 1-1000, Using Visual Studio 2010 C++ 1) U...

Using Visual Studio 2010 C++ 1) Using Windows Explorer, make a copy of Irvine\examples\Project_sample folder in the folder where you keep your materials for this course.

How to include list box control in visual basic project, How to Include Lis...

How to Include List Box control in your project A list box is used for representing the users with a data. You can prefer the data from the list box for data entry. No editing

Vb script coding conventions, Coding conventions are recommended that may h...

Coding conventions are recommended that may help you write code via Microsoft Visual Basic Scripting Edition. Coding conventions can include the given: Naming conventions for ob

Document interfaces - visual basic programming, DOCUMENT INTERFACES   ...

DOCUMENT INTERFACES   A SDI (Single document interface) and the MDI (Multiple document interfaces) are the document interfaces. The MDI based applications can have numerous ch

Looping, how to make logic of o program and how to use loop

how to make logic of o program and how to use loop

Variant subtypes, Beyond the simple string or numeric classifications, Vari...

Beyond the simple string or numeric classifications, Variant can make added distinctions regarding the specific nature of numeric information. For instance, you can have numeric in

Restricting the vocabulary - visual interface design, Restricting The Vocab...

Restricting The Vocabulary: The properly formed vocabulary is like an inverted pyramid. All easy to learn communication system follow this pattern. The canonical vocabulary in

Explain Databound Controls, Databound Controls - A controls use to display ...

Databound Controls - A controls use to display the contents of table using Data Control , have to bound each Control to the specific field and the controls are Known as the Data Bo

Create an application, 1. Create a new solution file named Ch03HandsOnProje...

1. Create a new solution file named Ch03HandsOnProject1. 2. Rename the form and set the filename of the form to frmMain and frmMain.vb, respectively. 3. Set the appropriate p

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd