Answer to Question #261017 in Java | JSP | JSF for Bjoy

Question #261017

1. Create a program that will convert the input dollar(s) into its equivalent peso. One dollar is approximately equal to 50.60 pesos. Then display The result.




Sample output:




The equivalent of $100 into is Php5,060.00

1
Expert's answer
2021-11-04T04:47:30-0400


package dollar;


import java.util.Scanner;




public class Dollar {


   
    public static void main(String[] args) {
        Scanner scan  = new Scanner(System.in);
        double dol = scan.nextInt();
        System.out.printf("The equivalent of $%.2f into is Php %.2f", dol, dol * 50.60 );
    }
    
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS