Computer Science, asked by trimannjeet, 11 months ago

Write a program in qbaasic to accept an number and find square of each digit.​

Answers

Answered by vkmarmath
0

Answer:

import java.util.*;

/*Java Program to find square, square root and cube of a given number*/

public class j5

{

public static void main(String args[]){

Scanner sc=new Scanner(System.in);

int num;

System.out.print("Enter an integer number: ");

num=sc.nextInt();

System.out.println("Square of "+ num + " is: "+ Math.pow(num, 2));

System.out.println("Cube of "+ num + " is: "+ Math.pow(num, 3));

System.out.println("Square Root of "+ num + " is: "+ Math.sqrt(num));

}

}

Similar questions