c# - multiplication table using two nested loops but i am getting an error -


i trying create table like...

desired:

enter image description here

but code coming out like..

actual:

enter image description here

my code:

static void main(string[] args)     {         (int = 0; <= 9; i++)         {             console.write(i + "\t");             (int j = 1; j <= 9; j++)             {                 if (i > 0) console.write(i * j + "\t");                 else console.write(j + "\t");             }             console.write("\n");         }         console.readkey();     } 

how add * , -, |?

        (int = 0; <= 9; i++)         {             if (i == 0)             {                 console.write("*\t | \t");             }             else             {                 console.write(i + "\t | \t");             }               (int j = 1; j <= 9; j++)             {                 if (i > 0)                 {                     console.write(i * j + "\t");                 }                 else                 {                     console.write(j + "\t");                 }             }             console.write("\n");              if (i == 0)             {                 console.writeline("-------------------------");             }         } 

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -