Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Ejercicios;
- import java.io.BufferedReader;
- import java.io.IOException;
- import java.io.InputStreamReader;
- public class Ejecicio40 {
- public static void main(String[] args) throws IOException {
- int X, cuadrado , cubo ;
- BufferedReader vl = new BufferedReader(new InputStreamReader(System.in));
- System.out.println(" digite el valor de X : " );
- X = Integer.parseInt(vl.readLine()) ;
- cuadrado = X * X ;
- cubo = X * X * X;
- System.out.println("el valor del cuadrado es = " + cuadrado);
- System.out.println("el valor del cubo es = " + cubo);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement