suggest some programs of scanner class without if or if else
Answers
Answered by
1
//program to find the square of a number given by the user
import java. util. Scanner;
public class somename
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in) ;
System.out.print("Enter a number: ")
double num=school.nextDouble() ;
double square_num=Math.pow(num) ;
System.out.print("The square of "+num+" is "+square_num)
}
}
Answered by
2
Answer:
hi dear friend
how are you I hope you are fine
Similar questions
Math,
2 months ago
Math,
2 months ago
Social Sciences,
2 months ago
Math,
6 months ago
Social Sciences,
11 months ago
History,
11 months ago
English,
11 months ago