java program
write a class to input name of the customer and bill amount. increase bill amount by 15%.com print name of the customer, old bill amount and bill amount.
WARNING- DONT SPAM OTHERWISE WILL BE REPORTED. ANSWER CORRECTLY
Answers
Explanation:
import java.util.*;
class Bill
{
public static void main(String args[])
{
String name;
int old_bill, bill_amount;
Scanner sc=new Scanner(System. in);
System.out.println("Enter name");
System.out.println("Number old bill");
name=sc.nextLine();
old_bill=sc.nextInt();
bill_amount= old_bill*15/100;
System.out.println("The name of the customer is"+name);
System.out.println("The old bill is"+old_bill);
System.out.println("The net bill is"+bill_amount);
}
}
Answer:
AnswEr :
The other number = 32.
Explanation :
We are given with the H.C.F and L.C.M of two numbers and one number, that is,
H.C.F = 16.
L.C.M = 28.
One number = 14.
We have to find out the other number.
Now,
Let us assume that, the other number be x.
As we are given with the H.C.F and L.C.M of two numbers and one number we know the required formula, that is,
→ (One number × the other number) = (HCF × LCM)
Substituting the given values in the formula,
→ 14 × x = 16 × 28
→ 14x = 16 × 28
→ 14x = 448
→ x = 448/14
→ x = 32
Hence, the other number is 32.