Adblock breaks this site

Need very short program

Discussion in 'Programming General' started by Zuzel111, Jan 11, 2013.

  1. Zuzel111

    Zuzel111 www.Sparta.Rs - #1 Fire Cape service 1 Def 1 Pray
    Zuzel111 Donor Retired Sectional Moderator

    Joined:
    Mar 26, 2011
    Posts:
    16,736
    Referrals:
    336
    Sythe Gold:
    4,084
    Vouch Thread:
    Click Here
    Discord Unique ID:
    377271265838366730
    Discord Username:
    spartars
    Two Factor Authentication User Sythe Awards 2013 Winner MushyMuncher Pokémon Trainer St. Patrick's Day 2013 Easter 2013 Lumpy Space Princess Sythe RSPS Player Halloween 2013
    Christmas 2013 Gohan has AIDS <3 n4n0 Tortoise Penis Heidy UWotM8? Shitting Rainbow Former OMM Hey... this isnt a fun rank
    Supporting Business Spyro Potamus Extreme Homosex St. Patrick's Day 2014 Sythe's 10th Anniversary
    Need very short program

    I need very short program, preferably source code
    Program must display all possible 3 symbol combinations and 2 symbols. It can run in CMD
    A-Z
    0-9
     
  2. RuneScapeJJ

    RuneScapeJJ Guru
    $25 USD Donor New

    Joined:
    Aug 14, 2011
    Posts:
    1,522
    Referrals:
    1
    Sythe Gold:
    0
    Potamus
    Need very short program

    On my phone but for simba
    Procedure generate:
    Var
    I, j: integer;
    Options: tstringarray;

    Begin
    Options := ['a', etc.];
    For i:=0 to high(options) do
    For j:=0 to high(options) do
    Writeln(options + options[j]);
    End;
     
  3. Zuzel111

    Zuzel111 www.Sparta.Rs - #1 Fire Cape service 1 Def 1 Pray
    Zuzel111 Donor Retired Sectional Moderator

    Joined:
    Mar 26, 2011
    Posts:
    16,736
    Referrals:
    336
    Sythe Gold:
    4,084
    Vouch Thread:
    Click Here
    Discord Unique ID:
    377271265838366730
    Discord Username:
    spartars
    Two Factor Authentication User Sythe Awards 2013 Winner MushyMuncher Pokémon Trainer St. Patrick's Day 2013 Easter 2013 Lumpy Space Princess Sythe RSPS Player Halloween 2013
    Christmas 2013 Gohan has AIDS <3 n4n0 Tortoise Penis Heidy UWotM8? Shitting Rainbow Former OMM Hey... this isnt a fun rank
    Supporting Business Spyro Potamus Extreme Homosex St. Patrick's Day 2014 Sythe's 10th Anniversary
    Need very short program

    [Error] (7:18): Unknown identifier 'etc' at line 6
    Compiling failed.
     
  4. novice

    novice Active Member

    Joined:
    Jun 21, 2008
    Posts:
    111
    Referrals:
    0
    Sythe Gold:
    0
    Need very short program

    You are supposed to replace the "etc" with all the possible characters.
    eg:

    Options := ['a', 'b', 'c', 'd'];
     
  5. Zuzel111

    Zuzel111 www.Sparta.Rs - #1 Fire Cape service 1 Def 1 Pray
    Zuzel111 Donor Retired Sectional Moderator

    Joined:
    Mar 26, 2011
    Posts:
    16,736
    Referrals:
    336
    Sythe Gold:
    4,084
    Vouch Thread:
    Click Here
    Discord Unique ID:
    377271265838366730
    Discord Username:
    spartars
    Two Factor Authentication User Sythe Awards 2013 Winner MushyMuncher Pokémon Trainer St. Patrick's Day 2013 Easter 2013 Lumpy Space Princess Sythe RSPS Player Halloween 2013
    Christmas 2013 Gohan has AIDS <3 n4n0 Tortoise Penis Heidy UWotM8? Shitting Rainbow Former OMM Hey... this isnt a fun rank
    Supporting Business Spyro Potamus Extreme Homosex St. Patrick's Day 2014 Sythe's 10th Anniversary
    Need very short program

    Procedure generate;
    Var
    I, j: integer;
    Options: tstringarray;

    Begin
    Options := ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','r','s','t','u','w','z','x','y','-','1','2','3','4','5','6','7','8','9','0'];
    For i:=0 to high(options) do
    For j:=0 to high(options) do
    Writeln(options + options[j]);
    End;

    [Error] (8:112): Closing square bracket (']') expected at line 7
    Compiling failed.
    [Error] (7:112): Closing square bracket (']') expected at line 6
    Compiling failed.
    [Error] (2:19): Semicolon (';') expected at line 1
    Compiling failed.
    [Error] (8:112): Closing square bracket (']') expected at line 7
    Compiling failed.
     
  6. Darthatron

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0
    Need very short program

    Seeing as this is the Visual Basic forum, I assume you wanted to use Visual Basic?

    Code:
            'The Array of Characters...
            Dim characters = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}
    
            '2 Character Combinations...
            For i As Integer = 0 To characters.GetUpperBound(0)
                For o As Integer = 0 To characters.GetUpperBound(0)
                    Console.WriteLine(characters(i) + characters(o))
                Next
            Next
    
            '3 Character Combinations...
            For i As Integer = 0 To characters.GetUpperBound(0)
                For o As Integer = 0 To characters.GetUpperBound(0)
                    For p As Integer = 0 To characters.GetUpperBound(0)
                        Console.WriteLine(characters(i) + characters(o) + characters(p))
                    Next
                Next
            Next
    But maybe you want to use C#?
    Code:
                //The Array of Characters...
                    string[] characters = new string[] { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
    
                //2 Character Combinations...
                for (int i = 0; i < characters.GetUpperBound(0); i++)
                {
                    for (int o = 0; o < characters.GetUpperBound(0); o++)
                    {
                        Console.WriteLine(characters[i] + characters[o]);
                    }
                }
    
                //3 Character Combinations...
                for (int i = 0; i < characters.GetUpperBound(0); i++)
                {
                    for (int o = 0; o < characters.GetUpperBound(0); o++)
                    {
                        for (int p = 0; p < characters.GetUpperBound(0); p++)
                        {
                            Console.WriteLine(characters[i] + characters[o] + characters[p]);
                        }
                    }
                }
     
< Can't download Java | Looking for a tutorial (exe) i once possessed >


 
 
Adblock breaks this site