Java Code Created Answer Question Import Javautilscanner Public Class Ipods Public Static Q37136546

Java code Created to answer this question:

import java.util.Scanner;

public class Ipods {

   public static void main(String[] args){

       // 10classes

       int arr[] = newint[10];

       Scanner sc = newScanner(System.in);

       int i = 0,n;

       //reading thequantity for each class

       while (i < 10){

          System.out.println(“Enter the number of Ipads required for class “+ (i + 1));

          n = sc.nextInt();

          // checking if the quantity is less than 20

          if (n < 20) {

              //storing in array

              arr[i++] = n;

          } else {

              System.out.println(“Quantity must be less than 20”);

          }

       }

       i = 0;

       double total = 0,cTotal = 0;

       while (i < 10){

          //calculating the total bill

          cTotal = arr[i] * 799;

          //adding 8.2% tax

          cTotal = 1.082

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.