Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Mathe
- {
- public Mathe()
- {
- fakultaet(10);
- }
- public static void main(String[] args)
- {
- new Mathe();
- }
- public long fakultaet(int n)
- {
- if(n == 0)
- {
- return 1;
- }
- long start = 1;
- for(int i = 1; i <= n; i++)
- {
- start *= i;
- System.out.println(start);
- }
- return start;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement