Programming Constant
Programming Constant
Constant
A constant is the opposite of a variable, it does
not change.
A constant will be having a fixed value.
Constants are still areas of memory that are
used to store data however they are used to
store data that will never change
Programming Task
Create a program that calculates the area of a
circle
Programming task 2
Create a program that calculates the area of a
rectangle
Programming Task 5
Dim StudentName As String
Dim StudentClass As String
Dim Paper1Mark As Integer
Dim Paper2Mark As Integer
Dim Total As Integer
Console.WriteLine("Enter student name")
StudentName = Console.ReadLine
Console.WriteLine("Enter class")
StudentClass = Console.ReadLine
Console.WriteLine("Enter mark for Paper 1")
Paper1Mark = Console.ReadLine
Console.WriteLine("Enter mark for Paper 2")
Paper2Mark = Console.ReadLine
Total = Paper1Mark + Paper2Mark
Console.WriteLine("The total is " & Total)
If Total > 90 < 99 Then
Console.WriteLine("The Student has a A")
ElseIf Total > 80 < 89 Then
Console.WriteLine("The Student has a B")
ElseIf Total > 70 < 79 Then
Console.WriteLine("The Student has a C")
ElseIf Total > 60 < 69 Then
Console.WriteLine("The Student has ")
If Total > 50 < 50 Then
Console.WriteLine("The Student has a D")
Else
Console.WriteLine("The Student has failed")
End If
Console.ReadKey()