Pretorianbg

Untitled

Oct 22nd, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 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 Coding
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int number = int.Parse(Console.ReadLine());
  14. string imput = Convert.ToString(number);
  15.  
  16. int lastNumber = number % 10;
  17. int lastNumberToprint = 0; //to be added to 33
  18. int lastNumCount = 0; // sum of last numbers
  19.  
  20.  
  21. for (int i = 0; i < imput.Length; i++)
  22. {
  23. lastNumCount += lastNumber;
  24. lastNumberToprint = lastNumber + 33;
  25.  
  26. for (int j = 0; j < lastNumber; j++)
  27. {
  28. Console.Write((char)lastNumberToprint);
  29. }
  30.  
  31. lastNumber = ((number - lastNumCount) / 10);
  32. lastNumber = lastNumber % 10;
  33.  
  34.  
  35. if (lastNumber == 0) Console.WriteLine("ZERO");
  36. else Console.WriteLine();
  37. }
  38. }
  39. }
  40. }
Add Comment
Please, Sign In to add comment