Answer to Question #327002 in Java | JSP | JSF for Sammy

Question #327002

 Write a program to perform the function of a Simple Interest Calculator.


1
Expert's answer
2022-04-11T12:13:01-0400
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        System.out.print("Enter number: ");
        double num = in.nextDouble();

        System.out.print("Enter persent: ");
        double per = in.nextDouble();

        System.out.printf("%.2f percent of %.2f = %.2f", per, num, ((per*num)/100));

    }
}

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