Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Do this in microsoft visual basic programming Problem 1: Using what you've learned in structured programming, subprocedures and functions, create a program that will compute

Do this in microsoft visual basic programmingimage text in transcribed

Problem 1: Using what you've learned in structured programming, subprocedures and functions, create a program that will compute for the Least Common Multiple (LCM) of 2, 3, 4 or 5 numbers (program user chooses from the four options from a read-only combobox that displays " 5 " by default). Solve for the LCM of multiple values using the prime factorization method. After entering the input values, the output displayed includes the Given: 330,30 and 45 Sample output displayed: The prime factors of the listed numbers are: when displaying your output message. Problem 2: Create a program that will ask for the following input integer values from the user: startVal, endVal, ModNum. The program will then compute for the sum of all numbers between startVal and endVal that are divisible 30=235 by ModNum. The program will list (1) how many numbers were summed up, (2) which number values were added up (separate one value from Sample output displayed: The 11 numbers from 100 to 200 that are divisible by 9 include 108,117,126,135,144,153,162,171,180,189, and 198. the other with a comma), and (3) the sum of the values. Use the sample The sum of the listed values is 1,683 . output on the right as your guide. Program Requirements: - When the program loads, Form1 will be displayed which contains (1) a welcome message to your user, written in a multi-line label and (2) a Close button. The message should also include some background information about the program creator. Pressing the Enter key will close this form and lead the user to Form2 that contains a combobox, a menu strip, and two buttons labeled "Load Chosen Program" and "Reset". - Your created program offers its user two packages to choose from: Least Common Multiple Checker (do this in Form3) and Sum Calculator (do this in Form4). The read-only combobox will display the Least Common Multiple Checker program by default. You as a programmer are free to design your user interface. - For each of the two programs, + Prevent the user from entering a dot, a hyphen or a non-numeric character using the keypress event. Use only one eventhandler for all input textboxes per form. ASCII code hint: chr(48) to chr(57) is 0 to 9 ; chr(65) to chr(90) is A to Z; chr(97) to chr(122) is a to z; chr(8) is the Backspace key Use at least ONE decision/selection structure, ONE repetition structure, and ONE function procedure. 4 Show a messagebox stating the specific cause of exception whenever an error occurs. + Observe proper visibility and declaration of variables and/or constants. + Include comments for each logical portion of the code to describe what the code is carrying out. 4 Include Reset and Exit buttons in Form3 and Form4. When either exit button is triggered, the welcome message form will load - Be sure to incorporate the interface design properties you were required to do in our exercises, e.g. Access keys, Accept button and Cancel button in each form, read-only output textboxes, tab sequencing in logical order for the textboxes and buttons, the form cannot be resized during runtime, etc. - Additionally, for Sum Calculator, endVal should not be less than or equal to startVal. Display a specific message for this type of incorrect input. - If there are no numbers divisible by ModNum within the specified range, display your output message similar to the sample below. Include two buttons in the message for yes and no. If user chooses yes, program goes back to form 4 . If user chooses no, the program goes back to Form 1 . "There are no numbers divisible by 9 between 20 and 25 . Do you want to try again

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions