SHARE
TWEET

ex 26.05 1

yanivtamari May 26th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.  
  5.     public static void main(String[] args) {
  6.         Scanner s=new Scanner(System.in);
  7.         int num;
  8.         num=s.nextInt();
  9.         for(int i=1,j=1;i<=num;j++,i=j*j){
  10.         System.out.printf("the value:%d,the result:%d\n",j,i);
  11.  
  12.         }
  13.  
  14.  
  15.     }
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top