monkeyslut45

Кирилл Деменев

Nov 12th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Main {
  6.  
  7.     static int everything(int num, int num2){
  8.         for (int i = 1; i < num2; i++) {
  9.             num *= num;
  10.         }
  11.         return num;
  12.     }
  13.  
  14.     public static void main(String[] args) {
  15.  
  16.         Scanner in = new Scanner(System.in);
  17.  
  18.         int a = in.nextInt(); int b = in.nextInt();
  19.  
  20.         System.out.println(everything(a,b));
  21.     }
  22. }
Add Comment
Please, Sign In to add comment