Computer Science, asked by syedmuneebrehman1852, 6 months ago

Work through the three steps of decomposition, flowcharting, and pseudocode for the following example.

You have a store that sells apples and oranges. Apples are Rs. 10 each and oranges are Rs. 5 each. Your program should get from the user the numbers of apples and oranges and output the total amount of money.

Answers

Answered by udayagrawal49
0

Answer: The required Java program :-

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

 Scanner scan = new Scanner(System.in);

 System.out.print("Enter number of apples: ");

 int apples = scan.nextInt();

 System.out.print("Enter number of oranges: ");

 int oranges = scan.nextInt();

 scan.close();

 System.out.print("Total amount of money = "+((10*apples)+(5*oranges)));

}

}

Please mark it as Brainliest.

Similar questions