Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. /*2. Napiši program, ki prebere znak in preveri, ali je vpisan znak mala črka angleške
  2. abecede. Če je, izpiše npr. »Znak x je mala črka, velika pa bi izgledala takole: X!«
  3. (v besedilu torej izpiše malo črko in še ustrezno veliko črko.*/
  4.  
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10.  
  11. namespace Naloga02
  12. {
  13. class Naloga02
  14. {
  15. static void Main(string[] args)
  16. {
  17. Console.Write("Vpiši malo črko: ");
  18. char crka = char.Parse(Console.ReadLine());
  19. if (char.IsLower(crka))
  20. {
  21. Console.WriteLine("Znak {0} je mala črka, velika pa bi izgledala takole: {1}!", crka, char.ToUpper(crka));
  22. }
  23. else
  24. {
  25. Console.WriteLine("Vpisana črka ni mala!");
  26. }
  27. Console.ReadKey(true);
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement