Skip to content

Instantly share code, notes, and snippets.

@Retrockit
Created April 13, 2024 20:55
Show Gist options
  • Save Retrockit/1964088156e116b76682c5d9b220e312 to your computer and use it in GitHub Desktop.
Save Retrockit/1964088156e116b76682c5d9b220e312 to your computer and use it in GitHub Desktop.
FirstHomeworkofCSharpCourse
/*
Requirements: Create a Console Application that has variables
to hold a person's name, age, if they are alive, and their phone number.
You do not need to capture these values from the user.
*/
Console.WriteLine("Hello, and welcome to my first homework assignment");
Thread.Sleep(3000);
Console.WriteLine("In this assignment I will be creating multiple variables, showing off different data types");
Thread.Sleep(5000);
Console.WriteLine("Well, let's get started!");
Thread.Sleep(3000);
Console.WriteLine("\n===========================================================");
string nameOfPerson = string.Empty;
int ageOfPerson = 0;
bool isPersonAlive = true;
double firstThreeNumber = 0;
decimal secondThreeNumber = 0;
int lastFourofNumber = 0;
int countryCode = 0;
nameOfPerson = "Shiny Pony";
ageOfPerson = 31;
isPersonAlive = true;
firstThreeNumber = 696;
secondThreeNumber = 696;
lastFourofNumber = 6969;
countryCode = 1;
Console.WriteLine(@$"Patient name is {nameOfPerson}, age {ageOfPerson}, are they currently alive? {isPersonAlive}. their telephone number is +{countryCode}-{firstThreeNumber}-{secondThreeNumber}-{lastFourofNumber}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment