Basic Data Types Learn programming Visual Basic (VB.net)

 Visual Basic exercises

 49 Char
Write a Visual Basic (VB.net) program to ask the user for three letters and display them in reverse order....
 50 Triangle
Write a program which asks for a symbol and a width, and displays a triangle of that width, using that number for the inner symbol, as in this example...
 54 Password as string
Write a Visual Basic (VB.net) program to ask the user for his/her name and his/her password (both must be strings) and repeat it as many times as nece...
 48 Password 5 attempts
Write a Visual Basic (VB.net) program which asks the user for his login and password. Both must be strings. After 5 wrong attempts, the user will be r...
 54 Calculator - if
Write a Visual Basic (VB.net) program which asks the user for two numbers and an operation to perform on them (+,-,*,x,/) and displays the result of t...
 45 Calculator - switch
Write a program which asks the user for two numbers and an operation to perform on them (+,-,*,x,/) and displays the result of that operation, as in t...
 35 Double
Calculate the perimeter, area and diagonal of a rectangle, given its width and its height....
 52 Calculate values of a function
Create a Visual Basic (VB.net) program to display certain values of the function y = x2 - 2x + 1 (using integer numbers for x, ranging from -10 to +10...
 45 Display a function
Create a program to "draw" the graphic of the function y = (x-4)2 for integer values of x ranging -1 to 8. It will show as many asterisks on screen as...
 47 Float, speed units
Create a Visual Basic (VB.net) program to ask the user for a distance (in meters) and the time taken (as three numbers: hours, minutes, seconds), and ...
 49 Sphere, float
Calculate the surface and volume of a sphere, given its radius (surface = 4 * pi * radius squared; volume = 4/3 * pi * radius cubed). Hint: for "fl...
 46 Vowel - switch
Create a program to ask the user for a symbol and answer if it is a (lowercase) vowel, a digit, or any other symbol, using "switch"....
 40 Vowel - if
Create a Visual Basic (VB.net) program to ask the user for a symbol and answer if it is a (lowercase) vowel, a digit, or any other symbol, using "if"....
 43 Triangle, NorthEast
Write a Visual Basic (VB.net) program which asks for a width, and displays a triangle like this one: Enter the desired width: 5 ***** _**** __...
 45 Prime factors
Create a Visual Basic (VB.net) program that displays a number (entered by the user) as a product of its prime factors. For example, 60 = 2 · 2 · 3 · 5...
 36 If, symbols
Create a program to ask the user for a symbol and answer if is an uppercase vowel, a lowercase vowel, a digit or any other symbol, using "if"....
 47 Char + for
Create a program to write the letters "B" to "N" (uppercase), using "for"...
 57 Double, approximation of Pi
Create a program to calculate an approximation for PI using the expression: pi/4 = 1/1 - 1/3 + 1/5 -1/7 + 1/9 - 1/11 + 1/13 ... The user will in...
 39 Perimeter Area
Create a program to calculate the perimeter, area and diagonal of a rectangle from its width and height (perimeter = sum of the four sides, area = bas...
 38 Hexadecimal and binary
Create a Visual Basic (VB.net) program to ask the user for a number an display it both in hexadecimal and binary. It must repeat until the user enters...
 48 Binary
Create a Visual Basic (VB.net) program that asks the user for a decimal number and displays its equivalent in binary form. It should be repeated until...
 46 Conditional and boolean
Create a Visual Basic (VB.net) program that uses the conditional operator to give a boolean variable named "bothEven" the value "true" if two numbers ...
 52 Exceptions V2
Create a program to ask the user for a real number and display its square root. Errors must be trapped using "try..catch". Does it behave as you ex...