using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string Fname;
string Sname;
int Age;
string Info = Console.WriteLine ("Your Name is: " + Fname + " " + Sname + " And your Age is: " + Age);
string lol = Console.ReadLine();
Console.WriteLine("What is your Name?");
Console.Write("My First Name is: ");
Fname = (Console.ReadLine());
Console.WriteLine("What is your Second Name?");
Console.Write("My Second Name is: ");
Sname = (Console.ReadLine());
Console.WriteLine("What is your Age?");
Console.Write("My Age is: ");
Age = Convert.ToInt32 (Console.ReadLine());
if (Console.ReadLine("my information"))
{
Console.WriteLine(Info);
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string Fname;
string Sname;
int Age;
string Info;
string lol = Console.ReadLine();
Console.WriteLine("What is your Name?");
Console.Write("My First Name is: ");
Fname = (Console.ReadLine());
Console.WriteLine("What is your Second Name?");
Console.Write("My Second Name is: ");
Sname = (Console.ReadLine());
Console.WriteLine("What is your Age?");
Console.Write("My Age is: ");
Age = Convert.ToInt32 (Console.ReadLine());
Info = (Console.WriteLine ("Your Name is: " + Fname + " " + Sname + " And your Age is: " + Age));
if (lol == ("my information"))
{
Console.WriteLine(Info);
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string FName = "";
string SName = "";
int Age = 0;
Console.WriteLine("Hello, please fill out your Name & Age! :)");
Console.WriteLine("What is your first name?");
FName = Console.ReadLine();
Console.WriteLine("Ok, " + FName + " now your surname please!");
SName = Console.ReadLine();
Console.WriteLine("Great work so far! So far we know that your name is " + FName + " " + SName + ".");
Console.WriteLine("Ok, final step, how old are you?");
int.TryParse(Console.ReadLine(), out Age); //convert string > int
Console.WriteLine("Ok, lets verify it! :)");
if (FName != "" && SName != "" && Age != 0)
{
Console.WriteLine("Nice, you did it!"); /// do something else...
}
Console.Read(); //prevent it from closing
}
}

static string Fname;
static string Sname;
static int age;
static void Main(string[] args)
{
Console.WriteLine("What is your name?");
Fname = Console.ReadLine();
Console.WriteLine("What is your second name?");
Sname = Console.ReadLine();
Console.WriteLine("What is your age?");
string a = Console.ReadLine();
if (IsNumeric(a)) // The routine IsNumeric returns a boolean value
{
age = Convert.ToInt32(a);
}
else
{
// Not numeric, do something...
}
Console.WriteLine("Do you want to calculate result? (y/n)");
string reply = Console.ReadLine();
if (reply.ToLower() == "y")
{
Console.WriteLine("Your name is: " + Fname + Environment.NewLine + "Your second name is: " + Sname + Environment.NewLine + "Your age is: " + age);
Console.ReadLine();
}
}
static bool IsNumeric(this string s)
{
float output;
return float.TryParse(s, out output);
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string Fname;
string Sname;
int Age;
string Info;
string lol;
Console.WriteLine("What is your Name?");
Console.Write("My First Name is: ");
Fname = (Console.ReadLine());
Console.WriteLine("What is your Second Name?");
Console.Write("My Second Name is: ");
Sname = (Console.ReadLine());
Console.WriteLine("What is your Age?");
Console.Write("My Age is: ");
Age = Convert.ToInt32(Console.ReadLine());
Info="Your Name is: " + Fname + " " + Sname + " And your Age is: " + Age;
Console.WriteLine("If you would like to check your information, type my information.");
lol = Console.ReadLine();
if (lol == ("my information"))
{
Console.WriteLine(Info);
}
Console.ReadLine();
}
}
}