Advertisement
SoniaMilena

ejercicio 40

Jun 1st, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. package Ejercicios;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.IOException;
  5. import java.io.InputStreamReader;
  6.  
  7. public class Ejecicio40 {
  8.     public static void main(String[] args) throws IOException {
  9.         int X, cuadrado , cubo ;
  10.         BufferedReader vl = new BufferedReader(new InputStreamReader(System.in));
  11.         System.out.println(" digite el valor de X : "  );
  12.         X = Integer.parseInt(vl.readLine()) ;
  13.         cuadrado = X * X ;
  14.         cubo = X * X * X;
  15.         System.out.println("el valor del cuadrado es = " + cuadrado);
  16.         System.out.println("el valor del cubo es = " + cubo);
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement