programming-examples/c-sharp/_Basic/C# Sharp program that takes an age (for example 20) as input and prints something as.cs

13 lines
377 B
C#
Raw Normal View History

2019-11-15 12:59:38 +01:00
C# Sharp program that takes an age (for example 20) as input and prints something as "You look older than 20.
using System;
public class Exercise11
{
public static void Main()
{
int age;
Console.Write("Enter your age ");
age = Convert.ToInt32(Console.ReadLine());
Console.Write("You look younger than {0} ",age);
}
}