Question: using C++ 1) Write a small VB program that takes in a number and converts it to a string and then outputs the string. Feel
using C++
1) Write a small VB program that takes in a number and converts it to a string and then outputs the string. Feel free to be creative. (a) Include your code by pasting it in (b) AND upload ONLY (via attachment) the .exe so we can all run and test your code. (c ) Make sure your code is unique. 2) What is the difference between a function and a method? ex of #1: Public Class Form1 Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click End Sub Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged If Not IsNumeric(TextBox1.Text) Then TextBox2.Text = "" Exit Sub End If TextBox2.Text = GetTextForNumber(TextBox1.Text) End Sub Public Function GetTextForNumber(ByVal NMBR As Decimal) As String If NMBR <= 10 Then If NMBR = 0 Then Return "Zero" If NMBR = 1 Then Return "One" If NMBR = 2 Then Return "Two" If NMBR = 3 Then Return "Three" If NMBR = 4 Then Return "Four" If NMBR = 5 Then Return "Five" If NMBR = 6 Then Return "Six" If NMBR = 7 Then Return "Seven" If NMBR = 8 Then Return "Eight" If NMBR = 9 Then Return "Nine" If NMBR = 10 Then Return "Ten" End If If NMBR > 10 And NMBR <= 19 Then If NMBR = 11 Then Return "Eleven" If NMBR = 12 Then Return "Twelve" If NMBR = 13 Then Return "Thirteen" If NMBR = 14 Then Return "Fourteen" If NMBR = 15 Then Return "Fifteen" If NMBR = 16 Then Return "Sixteen" If NMBR = 17 Then Return "Seventeen" If NMBR = 18 Then Return "Eighteen" If NMBR = 19 Then Return "Nineteen" End If End Function Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Close() End Sub End Class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
