Printing the letters from A-Z using recursion in c# -


so here's have for, i'm trying print numbers a-z prints z, please , (using recursion)

using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; using system.io;  namespace atozrecursion {      class program     {        static void main(string[] args)      {         int number=65;         getaplha(number);         console.writeline(convert.tochar(getaplha(number)));         console.readkey();     }     public static int getaplha(int number=65)     {         if (number==90)         {             return convert.tochar(number);         }         return convert.tochar(getaplha(number + 1));     }  } 

}

remove writeline main , put @ start of getalpha, every letter printed, there call each letter.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -