Dzień dobry
Nie potrafię poradzić sobie z rzutowaniem linijki tab[i,j]=Math.Pow(i,j) . Czy mógłby ktoś podać mała podpowiedz co z tym dalej ?
using System;
namespace Tablice1
{
class Program
{
static void Main(string[] args)
{
byte w, k;
Console.Write("Podaj pierwsza liczbe: ");
w = Convert.ToByte(Console.ReadLine());
Console.Write("Podaj druga liczbe: ");
k = Convert.ToByte(Console.ReadLine());byte[,] tab = new byte[w, k]; for(int i=0 ; i < tab.GetLength(0) ; i++) for (int j = 0; j < tab.GetLength(1); j++) { tab[i, j] = Math.Pow(i,j); } for (int i = 0; i < tab.GetLength(0); i++) { for (int j = 0; j < tab.GetLength(1); j++) { Console.Write(tab[1, j] + " "); } Console.WriteLine(); } Console.ReadKey(); } }
}