Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1. using System;
  2.  
  3. namespace test1
  4. {
  5.     class MainClass
  6.     {
  7.         public static void Main (string[] args)
  8.         {
  9.             int a = Convert.ToInt32 (Console.ReadLine ());
  10.             int schet = Convert.ToInt32 (Console.ReadLine ());
  11.             int per = 0;
  12.  
  13.  
  14.             Console.WriteLine ("______________");
  15.             Console.WriteLine (a);
  16.             for (int i = 0; i < schet; i++)
  17.             {
  18.                 Console.WriteLine (per = a + 1);
  19.                 Console.WriteLine (a);
  20.                 Console.WriteLine (per = a + per);
  21.                 Console.WriteLine (per + 1);
  22.                 Console.WriteLine (per);
  23.                 Console.WriteLine (per = per+2);
  24.                 Console.WriteLine (per = per+1);
  25.                 Console.WriteLine (per = per-1);
  26.                 a = per;
  27.        
  28.             }
  29.        
  30.  
  31.  
  32.             Console.ReadKey ();
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement