Create a program called sum of numbers

Assignment Help Basic Computer Science
Reference no: EM13679293

Create a program called Sum of Numbers, with two buttons ( Enter numbers & Exit). The InputBox will be called Input Needed and will ask: Enter the positive integer value.

The answer will come in a message call Sum of Numbers stating: The sum of the number 1 through is

If the user enters a negative value, his application should display an error message. Use the following data:

Value Sum
5 15
10 55
20 210
100 5050

This is what I have so far, but I can't get the result to show in the MessageBox

Dim strUserInput
Dim IntUserInput As Integer
Dim i As Integer
strUserInput = InputBox("Enter a positive integer value", "Input Needed", 10)
If strUserInput <> String.Empty Then

Try
IntUserInput = CInt(strUserInput)
If IntUserInput < 0 Then
MessageBox.Show("Negative numbers are not accepted.")
Exit Sub
End If

'IntUserInput = (IntUserInput + i)
MessageBox.Show("Sum of Numbers", "The sum of the numbers 1 through" & (i + IntUserInput), MessageBoxButtons.OK)

Catch ex As Exception
MessageBox.Show("Quantity amount must be numeric.")
End Try
'show messages,
Else

End If
MessageBox.Show("Incorrect input", "You must enter a positive integer value", MessageBoxButtons.OK)

Reference no: EM13679293

Questions Cloud

Evaluate the change in the truck kinetic energy : As a 1220 kilogram truck travels up a 15.4 meter high hill, the non conservative forces of friction, obtain the change in the truck kinetic energy as it travels from the bottom of the hill to the top of the hill
In mips assembly language : In MIPS Assembly language
Write the sql query to return all of the information : Write the SQL query to return all of the information
Estimate the capacitance of the system : Two conductors having net charges of +13 µC and -13 µC have a potential difference of 13.0 Volt between them. Estimate the capacitance of the system
Create a program called sum of numbers : Create a program called Sum of Numbers
Evaluate what is the value of the capacitance : When a 18 Volt battery is connected to the plates of a capacitor; it stores a charge of 21.0 µC. Evaluate what is the value of the capacitance
What location would you recommend for disneys : What location would you recommend for Disneys next theme park in Asia - Tell us your reasons from the perspectives from cultural differences, market potential, and/or others.
Obtain the maximum charge the cloud can hold : Consider the Earth and a cloud layer 700 meter above the planet to be the plates of a parallel-plate capacitor. obtain the maximum charge the cloud can hold
Obtain what the magnitude of electric field between plates : Oppositely charged parallel plates are separated by 3.77 millimeter. A potential difference of 600 Volt exists between the plates. Find the magnitude of electric field between the plates

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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