Write a java program to 10% of a number entered by user.
Answers
Answered by
1
import java.util.Scanner;
public class Pattern {
public static void main (String args[]) {
Scanner sc= new Scanner(System.in);
double n;
System.out.println("Enter a Number ");
n=sc.nextInt();
double P;
P= (n*0.1);
System.out.print("10% of number"+n+"="+P);
}}
Similar questions