examples - char c; Console.WriteLine("Enter a...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 char c Console.WriteLine("Enter a character:") c = Convert.ToChar(Console.ReadLine()) switch (c) { case 'a': case 'e': case 'i': case 'o': case 'u': Console.WriteLine("vowel") break default: Console.WriteLine("not Vowel") break int y console.WriteLine("Enter a year") y=Convert.ToInt32(Console.readLine()) if(y%4==0) Console.WriteLine("It is Leap Year") else Console.WriteLine("it is not leap year") int age console.WriteLine("Enter age") age=Convert.ToInt32(Console.readLine()) if(age>=18) Console.WriteLine("Eligible to vote") else Console.WriteLine("not eligible to vote") char gender int age console.WriteLine("enter gender(m or f)") gender=Convert.Tochar(Console.readLine()) Console.WriteLine("enter age") age=Convert.Toint32(Console.ReadLine()) Console.WriteLine("he is eligible to marry") Console.WriteLine("she is eligible to marry") else Console.WriteLine("not eligible to marry") string n double sal,hra,da,pf,t char g
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

examples - char c; Console.WriteLine("Enter a...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online