
ej-1
By:
mig on
Oct 27th, 2013 | syntax:
None | size: 0.48 KB | hits: 30 | expires: Never
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
const int N = 10;
static void Main(string[] args)
{
int[] vect = new int[N];
int i;
i = 0;
while (i < N)
{
vect[i] = Convert.ToInt32(Console.ReadLine());
i++;
}
i=0;
while (i < N)
{
if (vect[i] % 3 == 0)
vect[i] = vect[i + 1];
i++;
}
i=0;
while (i < N)
{
Console.Write(vect[i]);
i++;
}
Console.ReadLine();
}
}
}