Dain1234 / Java-Programming

0 stars 0 forks source link

Square cube of decimal #30

Open Dain1234 opened 1 year ago

Dain1234 commented 1 year ago

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); }

}