The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 314 Weeks Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
The objective of the assignment is to write two programs in Visual Basic that apply looping logic using a Do While loop within a program. The first program will use a counter-controlled loop. The second program will use a sentinel-controlled loop. Another objective is to work through any syntax errors encountered (debugging) to develop a correct solution that is free of errors.
Â
Description of Part 1:  Create a working Visual Basic solution using the Visual Studio IDE that outputs every number from 1 through 20 using a counter-controlled Do While loop. Note that no input will be required from the user. Provided your logic from last week was correct, you can use the pseudocode and flowchart from last's week's assignment to help you code your solution. Description of Part 2:  Create a new project in Visual Studio that uses a sentinel controlled loop. The program should ask for a new Integer number until the user types -999. Each number should be added into a sum variable. Recall that -999 is called a sentinel value and when using this kind of loop you will want to prompt the user for the first number before the loop begins. The statements inside the loop body should add the number provided by the user to the sum, but do not display the number for the user. The output of the sum should only occur one time at the end of the program.
Requirements:  For full credit, make sure that you create both programs using Visual Studio. Also make sure that the programs compile (build) successfully and without any errors. Ensure that you have completed both parts of the assignment.
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly