Boris-Stavrev92

Untitled

Jun 7th, 2017
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _17.Print_Part_Of_ASCII_Table
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int startIndex = int.Parse(Console.ReadLine());
  14. int endIndex = int.Parse(Console.ReadLine());
  15.  
  16. for (char @char = (char)startIndex; @char <= endIndex; @char++) // имаме просто цикъл и се използва casting , който преобразува от int в char
  17. { // слага се @ пред char за да не се обърка с ключова дума char :)
  18. Console.Write(@char + " ");
  19. }
  20.  
  21.  
  22.  
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment