Notifications
Clear all

Age Calculator

Page 1 / 3

Posts: 0
Topic starter
(@Legless)
New Member
Joined: 10 years ago

This little program is basically a Calculator. It calculates your age by a user inputting their year of birth and the current year. It's not the best as it's not got much to it, in terms of color and format. No one could do it as they were stuck. I was stuck. Opened my source file in Visual Studio and had a mess around. I worked it out. The first in my class to do it, feel pretty proud. I am not used to Programming as I do a lot of Web Development. We've only had one lesson in Programming so I'm chuffed. Here's my beauty:


https://www.virustotal.com/uk/url/08bc4870850611e232a576b983e6a961d4cbd7384955dbca41beaa2ba8dbfe1f/analysis/1410296264/
http://r.virscan.org/report/39e6675ed6aefb8d253f85d4e1a4254

Module Module1
	
	    Sub Main()
	
	        ' Declare variables to be used for D.O.B
	        Dim BirthYear, CurrentYear, Age As Integer
	
	        ' Read D.O.B from user
	        Console.Write("Please enter your Year Of Birth: ")
	        BirthYear = Console.ReadLine()
	        Console.WriteLine()
	
	        ' Read Current Year from user
	        Console.Write("Please enter current year: ")
	        CurrentYear = Console.ReadLine()
	        Console.WriteLine()
	
	        ' Calculate Age
	        Age = CurrentYear - BirthYear
	
	        ' Display Results
	        Console.WriteLine()
	        Console.Write("You are " & Age & " years old")
	
	        ' Holds display line for viewing
	        Console.ReadLine()
	    End Sub
	End Module
	

Reply
Name of the Video Game, and any other Tags
13 Replies
Posts: 0
 Wavy
(@Wavy)
New Member
Joined: 10 years ago

Everyone starts somewhere in programming! This is a nice little program you've got here.

Reply
Posts: 0
Topic starter
(@Legless)
New Member
Joined: 10 years ago

Everyone starts somewhere in programming! This is a nice little program you've got here.

Thank you. 🙂

Reply
Posts: 0
(@Amazing)
New Member
Joined: 1 second ago

Nice Program

But download link broken

Reply
Posts: 0
Topic starter
(@Legless)
New Member
Joined: 10 years ago

Nice Program

But download link broken

Link updated, thank you.

Reply
Page 1 / 3