The repository contains a collection of different programming snippets to different programming languages from own developments as well as other projects
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
programming-examples/c-sharp/Functions/C# Program to Illustrate th...

20 lines
430 B

/*
* C# Program to Illustrate the use of Conditional Logical Operator
*/
using System;
public class Program
{
static void Main()
{
int age;
Console.WriteLine("Enter the Age :");
age=int.Parse(Console.ReadLine());
bool adult = age >= 18 ? true : false;
Console.WriteLine("Adult : {0}", adult);
Console.Read();
}
}
/*
Enter the Age : 10
Adult : false