SHARE
TWEET

Untitled

a guest Jan 24th, 2020 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.io.*;
  2. public class Kertoma {
  3.     public static void main(String[] args) {
  4.         int n;
  5.         int kertoma = 1;
  6.         int alku;
  7.        
  8.        
  9.         BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
  10.        
  11.         try {
  12.            
  13.              System.out.print("Anna kokonaisluku:");
  14.              n = Integer.parseInt(in.readLine());
  15.            
  16.             for (alku = 1; alku <= n; alku++) {
  17.    
  18.             kertoma = kertoma * n; 
  19.             System.out.println("Luvun " + n + " kertoma on " + kertoma);
  20.         }
  21.         } catch (Exception e) {
  22.         System.out.println("Syƶte on virheellinen.");
  23.     }
  24.     }
  25. }
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