Aliendreamer

inner cycles

Feb 27th, 2018
175
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. using System.Collections.Generic;
  3.                    
  4. public class Program
  5. {
  6.     public static void Main()
  7.     {
  8.         char first =char.Parse(Console.ReadLine());
  9.         char second =char.Parse(Console.ReadLine());
  10.         char third=char.Parse(Console.ReadLine());
  11.         char forth=char.Parse(Console.ReadLine());
  12.         int num=int.Parse(Console.ReadLine());
  13.         int count=0;
  14.        
  15.     for(int a=0;a<=num;a++)
  16.     {
  17.         for(char i='A';i<=first;i++)
  18.         {      
  19.             for(char k='a';k<=second;k++)
  20.             {
  21.                 for(char j='a';j<=third;j++)
  22.                 {
  23.                     for(char f='a';f<=forth;f++)
  24.                     {
  25.                         Console.WriteLine("{0}{1}{2}{3}{4}",i,k,j,f,a);
  26.                         count++;
  27.                     }
  28.                 }
  29.             }  
  30.         }
  31.     }
  32.     Console.WriteLine(count);  
  33.  
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment