using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Gathering_Data
{
class Program
{
static void Main(string[] args)
{
Console.Title = "Info Whore";
Console.WriteLine("Whats Your Name?");
string Name = Console.ReadLine();
Console.WriteLine("Hello {0} how old are you?", Name);
double age = Console.Read();
if (age < 18) Console.WriteLine("Hey now you've gotta be 18 to use this!");
Console.ReadLine();
if (age > 18) Console.WriteLine("Your Name Is {0} and you are {1} years old", Name, age);
Console.ReadLine();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Gathering_Data
{
class Program
{
static void Main(string[] args)
{
Console.Title = "Info Whore";
Console.WriteLine("What's Your Name?");
string Name = Console.ReadLine();
if(Name.All(char.IsLetter))
{
Console.WriteLine("Hello {0}, how old are you?", Name);
string age = Console.ReadLine();
int value;
if (int.TryParse(age, out value))
{
if (value < 18)
{
Console.WriteLine("Hey now, you've gotta be 18 to use this!");
Console.ReadLine();
}
else
{
Console.WriteLine("Your name is {0} and you are {1} years old.", Name, age);
Console.ReadLine();
}
}
else
{
Console.WriteLine("Please write your age in numbers!");
Console.ReadLine();
}
}
else
{
Console.WriteLine("Please write your name with letters!");
Console.ReadLine();
}
}
}
}

using System;
using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Gathering_Data { class Program { static void Main(string[] args) { //Variable Declarations string strUsersName = ""; int intUsersAge = 0; //Setting Up the UI Console.Title = "Info Whore"; //Gathering User Info/Input Console.WriteLine("Whats Your Name?"); strUsersName = Console.ReadLine(); Console.WriteLine("Hello {0} how old are you?", strUsersName); intUsersAge = Console.Read(); //Responding to the user's age. if (intUsersAge <= 18) { Console.WriteLine("Hey now you've gotta be 18 to use this!"); } else { Console.WriteLine("Your Name Is {0} and you are {1} years old", strUsersName, intUsersAge); } Console.ReadLine(); } } }
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Gathering_Data
{
class Program
{
static void Main(string[] args)
{
// Delcare Variables
string strUserName = "";
int intUserAge = 0;
// Program UI Bar
Console.Title = "Useless Program";
// Asks User For Input
// Sets The Name Variable To Read The Input From Above
Console.WriteLine("Whats Your Name?");
strUserName = Console.ReadLine();
// Displays Back Their Name And Asks For Their Age
// Sets Age Variable To Read The Input
Console.WriteLine("Hello {0} how old are you?", strUserName);
intUserAge = Console.Read();
if (intUserAge <= 18)
{
Console.WriteLine("Hey now you've gotta be 18 to use this!");
}
else
{
Console.WriteLine("Your Name Is {0} and you are {1} years old", strUserName, intUserAge);
}
Console.ReadLine();
}
}
}