0
Help please (I dont get it)
https://edabit.com/challenge/2QvnWexKoLfcJkSsc public class Program13 { public static int[] ArrayOfMultiples(int num, int length) { int[] hello; for (int i = 1; i <= length; i++) { hello = Convert.ToInt32(Math.Pow(num, i)); } return hello; } } visual studios says: int cant be converted to int[]
2 Respuestas
+ 1
I'm not sure but see if this works.
public class Program {
public static int[] ArrayOfMultiples(int num, int length) {
int[] hello = new int[length];
int x = 1;
for (int i = 0; i < length; i++)
{
hello[i] = Convert.ToInt32(Math.Pow(num, x));
x++;
}
return hello;
}
}