Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)

ej-1

By: mig on Oct 27th, 2013  |  syntax: None  |  size: 0.48 KB  |  hits: 30  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8. class Program
  9. {
  10. const int N = 10;
  11. static void Main(string[] args)
  12. {
  13. int[] vect = new int[N];
  14. int i;
  15. i = 0;
  16. while (i < N)
  17. {
  18. vect[i] = Convert.ToInt32(Console.ReadLine());
  19. i++;
  20. }
  21. i=0;
  22. while (i < N)
  23. {
  24. if (vect[i] % 3 == 0)
  25. vect[i] = vect[i + 1];
  26. i++;
  27.  
  28. }
  29. i=0;
  30. while (i < N)
  31.  
  32. {
  33. Console.Write(vect[i]);
  34. i++;
  35. }
  36. Console.ReadLine();
  37. }
  38.  
  39. }
  40. }