Flow Control Learn programming Visual Basic (VB.net)

 Visual Basic exercises

 53 Positive and negative
Write a Visual Basic (VB.net) program to get a number and answer whether it is positive or negative....
 49 Multiply if not zero
Write a Visual Basic (VB.net) program to ask the user for a number; if it is not zero, then it will ask for a second number and display their value; o...
 47 Divide if not zero
Write a Visual Basic (VB.net) program to ask the user for two numbers, and show their division if the second number is not zero; otherwise, it will di...
 79 Divide if not zero (Using else)
Create a version of the previous program, using "else"...
 55 Greatest of three numbers
Write a Visual Basic (VB.net) program to get three numbers from the user and display the greatest one....
 51 Repeat until 0
Create a Visual Basic (VB.net) program to ask the user for a number "x" and display 10*x. It must repeat until the user enters 0 (using "while")....
 53 Repeat until 0 (Use Do While)
Create a Visual Basic (VB.net) program to ask the user for a number "x" and display 10*x. It must repeat until the user enters 0 (using "do-while")....
 51 While + Counter
Create a Visual Basic (VB.net) program to display the numbers 1 to 10 on screen, using "while"....
 68 Multiplication table (use while)
Write a Visual Basic (VB.net) program to ask the user for a number and display its multiplication table, using a "while"...
 47 Odd numbers descending
Create a Visual Basic (VB.net) program to display on the screen the odd numbers from 15 to 7 (downwards), using "while"...
 52 Sum numbers
Write a Visual Basic (VB.net) program to ask the user for an undetermined amount of numbers (until 0 is entered) and display their sum, as follows: ...
 47 Two negative numbers
Create a Visual Basic (VB.net) program to accept two numbers from the user and answer if both are negative or not....
 47 One or two negative numbers
Create a Visual Basic (VB.net) program to accept two numbers from the user and answer if both are negative, if only one is, or if none of them is....
 47 Multiples
Create a Visual Basic (VB.net) program to write on screen the numbers from 1 to 500 that are multiples of 3 and also multiples of 5 (hint: use the rem...
 45 Number repeated
Write a Visual Basic (VB.net) program which asks for a number and an amount, and shows that number repeated as many times as the user has indicated, a...
 49 Password
Write a Visual Basic (VB.net) program to ask the user for his/her login and his/her password (both must be integer numbers) and repeat it as many time...
 67 Password V2
Write a Visual Basic (VB.net) program to ask the user for his/her login and his/her password (both must be integer numbers), until the entered login i...
 57 Many divisions
Write a Visual Basic (VB.net) program to ask the user for two numbers and show their division and the remainder of the division. It will warn if 0 is ...
 58 Several multiplication tables, (use do while)
Display the multiplication tables from 2 to 6, using nested "do...while"....
 62 Square
Write a Visual Basic (VB.net) program which asks for a number and a width, and displays a square of that width, using that number for the inner symbol...
 97 Break & continue
Create a Visual Basic (VB.net) program to write the even numbers from 10 to 20, both included, except 16, in 3 different ways: - Incrementing 2 in ...
 47 Rectangle V2
Write a Visual Basic (VB.net) program which asks for a number, a width and a height and displays a rectangle of that width and that height, using that...
 57 Repetitive structures
Create a Visual Basic (VB.net) program to ask the user for two numbers and display the numbers between them (both included), three times: using "for",...
 47 Digits in a number
Create a Visual Basic (VB.net) program to calculate how many digits has a positive integer (hint: it can be done by dividing by 10 several times). If ...
 50 Hollow square
Write a program which asks for a symbol, a width and displays a hollow square of that width, using that number for the outer symbol, as in this exampl...
 46 Product
Create a Visual Basic (VB.net) program which asks the user for two integer numbers and displays their multiplication, but not using "*". You must use ...
 49 Absolute value
Write a Visual Basic (VB.net) program to calculate (and display) the absolute value of a number x: if the number is positive, its absolute value is ex...
 47 Hollow rectangle
Write a program which asks for a symbol, a width and a height and displays a hollow rectangle of that width and that height, using that number for the...
 43 Statistics
Exercise 2.29: Statistics Objetive: Write a program to compute several basic statistical operations: it will accept numbers from the user and sho...
 95 Switch
Create a program in Visual Basic (VB.net) to display the "text mark" corresponding to a certain "numeric mark", using the following equivalence: 9....
 75 Conditional operator, positive & smaller
Create a Visual Basic (VB.net) program which asks the user for two numbers and answers, using the conditional operator (?), the following: - If the...
 54 Prime number
Write a Visual Basic (VB.net) program which asks the user for an integer number and answers if it is a prime number or not....
 42 Give change
Create a Visual Basic (VB.net) program to return the change of a purchase, using coins (or bills) as large as possible. Assume we have an unlimited am...
 68 Exceptions
Create a Visual Basic (VB.net) program to ask the user for two numbers and display their division. Errors must be trapped using "try..catch"....