In: Computer Science
1. What is the difference between Write and WriteLine in Visual Basic?
2. Can there be more than one variable in a Write or WriteLine? Do
they have to be all variables of the same type? Show it by
modifying your program. Submit the modified and duly documented
program in Visual Basic.
3. Explain the possible assignments of values to numerical
variables of different primitive types: integer assigned to
integer, integer assigned to real, real assigned to integer and
real assigned to real. Which assignments are possible and which
give an error in Visual Basic?
Dear Student ,
As per the requirement submitted above , kindly find the below solution.
Question 1:
************************
Question 2:
Dim firstName As String = "Virat"
Dim age As Integer = 31
Console.Write(firstName & " is " & age & " years
old!")
Output :
Example for WriteLine() method :
Dim firstName As String = "Virat"
Dim age As Integer = 31
Console.WriteLine(firstName & " is " & age & " years
old!")
Output :
************************
NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.