Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace LowerOrUpper
- {
- class Program
- {
- static void Main(string[] args)
- {
- int x = char.Parse(Console.ReadLine());
- if (x > 64 && x < 91 )
- {
- Console.WriteLine("upper-case");
- }
- else if (x > 96 && x < 123)
- {
- Console.WriteLine("lower-case");
- }
- }
- }
- }
- Решение с тернарен оператор:
- using System;
- namespace LowerOrUpper
- {
- class Program
- {
- static void Main()
- {
- Console.WriteLine(char.Parse(Console.ReadLine()) < 91? "upper-case": "lower-case");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement