18
1
using System;
2
public class LearnModo {
3
public static void Main() {
4
5
// define a variable to store the age data
6
int age;
7
8
// prompt the user to enter their age
9
Console.WriteLine("Enter your age:");
10
11
/*assign the age variable what the user entres.
12
Note: The Console.ToInt32 is to convert the string input to an integer value */
13
age = Convert.ToInt32(Console.ReadLine());
14
15
// Print out the user age
16
Console.WriteLine("Your are " + age + " years old!");
17
}
18
}
Cached Result
True
True
False
True
False