Commit 0c44028f by Patryk Czarnik

silnia long

parent 7448d513
......@@ -4,10 +4,10 @@ import java.util.Scanner;
public class Silnia1 {
static int silnia(int n) {
int iloczyn = 1;
static long silnia(int n) {
long iloczyn = 1;
for(int i = 1; i <= n; i++) {
iloczyn *= i; // ew. iloczyn = iloczyn * i;
iloczyn *= i;
}
return iloczyn;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment