heres the code in C#
Code:public void printPowers() { double i=1.0; while (i<6) { Console.Write(Math.Pow(i, 1.0)+" "); Console.Write(Math.Pow(i, 2.0)+" "); Console.Write(Math.Pow(i, 3.0)); Console.WriteLine(); i++; }
heres the code in C#
Code:public void printPowers() { double i=1.0; while (i<6) { Console.Write(Math.Pow(i, 1.0)+" "); Console.Write(Math.Pow(i, 2.0)+" "); Console.Write(Math.Pow(i, 3.0)); Console.WriteLine(); i++; }
There are currently 1 users browsing this thread. (0 members and 1 guests)