Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.87 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 ConsoleApplication2
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int[] tablica1 = new int[10];
  14.  
  15.             for (int i = 0; i < tablica1.Length; i++)
  16.             {
  17.                
  18.                 tablica1[i] = i + 1;
  19.             }
  20.             for (int i = 0; i < tablica1.Length; i++)
  21.             {
  22.                 Console.Write(tablica1[i]);
  23.  
  24.                 if (tablica1[i] % 3 == 0)
  25.                 {
  26.                     Console.WriteLine();
  27.                
  28.                 }
  29.                 if (tablica1[i] == 7)
  30.                 {
  31.                     i++;
  32.                     Console.Write("osiem");
  33.                 }
  34.             }
  35.  
  36.  
  37.             Console.ReadKey();
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement