+ 1
How to get power 1 to 20
How can i get the power of number 1to 20 in row in c# or python
11 Respostas
+ 2
Just do in Python like this
x = 1
while x <= 20:
print(x**2)
x = x + 1
+ 2
Tharusha dilshan Same logic but just use
int x = 1;
while (x <= 20) {
Console.WriteLine(Math.Pow(x, 2));
x++;
}
+ 2
Martin Taylor He said the power of number 1 to 20. He didn't mention the what power 2, 3 or 4 and so on. So I gave that Example.
+ 2
It's very simple in python.....
print(1**20)
+ 2
for x in range(20):
x=x**2
print(x)
+ 2
It's x = 1
;)
+ 1
Thank you so much
+ 1
In c#??
+ 1
♥️
+ 1
Thanks
+ 1
Martin Taylor My dear friend go on description also.
"How can i get the power of number 1to 20 in row in c# or python"
See here - the power of number 1 to 20. I don't know what power. I just gave him example. If he got my point then he can do.
Let leave on him.