- import java.util.Scanner;
- public class retailPrice {
- public static void main (String[]args) {
- Scanner input = new Scanner(System.in);
- double wholesale, markup, retail=0;
- System.out.println("Enter the wholesale price! ");
- wholesale = input.nextDouble();
- System.out.println("Enter the markup percentage! ");
- markup = input.nextDouble();
- calculateRetail(wholesale, markup, retail);
- System.out.printf("The retail price of the item is %.2f\n ", retail); }
- public static double calculateRetail(double wholesale, double markup, double retail) {
- double percentage = markup / 100;
- return retail = percentage + wholesale; } }
After running the program it returns 0.00 for the retail price...How do i fix this problem? Thanx
Darren76 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.