Advertisement
dsavov_02

dean2

Mar 23rd, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. using System;
  2.  
  3. public class Program
  4. {
  5. public static void Main()
  6. {
  7. string input = Console.ReadLine();
  8. string output = "";
  9. foreach (char sym in input)
  10. {
  11. if (char.IsLower(sym))
  12. {
  13. output += char.ToUpper(sym);
  14. }
  15. else if (char.IsUpper(sym))
  16. {
  17. output += char.ToLower(sym);
  18.  
  19. }
  20. else if (char.IsDigit(sym))
  21. {
  22. int number = int.Parse(sym.ToString());
  23. number *= 2;
  24. output += number;
  25. }
  26. else if (sym =='!'|| sym == '{' || sym == '}' || sym == ')' || sym == '(' || sym == ','||sym == '*' || sym == '@' || sym == '*'|| sym == '"' || sym == '$' || sym == '#' || sym == '%' || sym == '-' || sym == '^')
  27. {
  28. output+=".";
  29. }
  30.  
  31. }
  32. for (int i = output.Length-1;i>=0;i--)// Обръща местата им от АБ в БА
  33. {
  34. Console.Write(output[i]);
  35. }
  36.  
  37.  
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement