Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.

Paste

Pasted as C# by polje ( 12 years ago )
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace listing3
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] polje = new int[10];
            for (int j = 0; j < polje.Length; j++)
            {
                polje[j] = j;
            }
            int temp = polje[0];

            for (int i = 1; i < polje.Length; i++)
            {
                polje[i - 1] = polje[i];
            }
            polje[polje.Length - 1] = temp;
            for (int p = 0; p < polje.Length; p++)
            {
                Console.Write(polje[p]+" ");
            }
            Console.WriteLine();
            foreach (int k in polje)
            {
                Console.Write(polje[k]+" ");
            }
            Console.ReadKey();
        }
    }
}

 

Revise this Paste

Parent: 68483
Your Name: Code Language: