Create three variables of string data type called firstname


Objective:

This assignment is designed to learn programming in VB.NET.

Questions:

In Visual Studio, create a VB.NET Console Application that does the following:

Create three variables of String data type, called firstNamelastName, and fullName respectively;

Assign your first name to the variable firstName;

Assign your last name to the variable lastName;

Concatenate the variable firstName, a string containing a space (i.e., " "), the variable lastName together, and then assign the result to the variable fullName;

Display your name in the console window using the statement Console.WriteLine(fullName)

(3 marks) In Visual Studio, create a VB.NET Console Application that does the following:

Create a variable of Integer data type, called marks;

Create a variable of String data type, called grade;

Assign 88 to marks;

Convert marks into grade as follows using the Select-Case statement:

marks

grade

90-100

A+

85-89

A

80-84

A-

77-79

B+

73-76

B

70-72

B-

67-69

C+

63-66

C

60-62

C-

50-59

D

0-49

F

(5) Display the values of marks and grade in the console window using the statements

Console.WriteLine(marks)

Console.WriteLine(grade)

(2 marks) Repeat Question 2 using the If-Then-ElseIf statement (instead of the Select-Case statement). Your output should be exactly the same as that of Question 2.

(3 marks) In Visual Studio, create a VB.NET Console Application that uses the While loop to display all leap years between 2017 and 2050. A leap year between 2017 and 2050 is a year that is an integer multiple of 4 (i.e., year Mod 4 = 0). For example, 2020 and 2040 are leap years. (Hint: you need both the While and If-Then statements.)

For each question, print the program and handwrite the output at the end of the printout of the program.

Request for Solution File

Ask an Expert for Answer!!
DOT NET Programming: Create three variables of string data type called firstname
Reference No:- TGS02877948

Expected delivery within 24 Hours