public class SquareCubeOfDecimal {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter the decimal number:");
double a = sc.nextFloat();
System.out.println("Square of number:" + a a);
System.out.println();
System.out.println("cube of number:" + a a * a);
}
package com.dain.logics;
import java.util.Scanner;
public class SquareCubeOfDecimal { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter the decimal number:"); double a = sc.nextFloat(); System.out.println("Square of number:" + a a); System.out.println(); System.out.println("cube of number:" + a a * a); }
}