1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
CaHeK987 [17]
3 years ago
5

You are working on a ticketing system. A ticket costs $10. The office is running a discount campaign: each group of 5 people is

getting a discount, which is determined by the age of the youngest person in the group. You need to create a program that takes the ages of all 5 people as input and outputs the total price of the tickets. Sample input: 55 28 15 38 63 sample output: 42.5 the youngest age is 15, so the group gets a 15% discount from the total price, which is $50 - 15% = $42.5
Computers and Technology
1 answer:
cupoosta [38]3 years ago
8 0

Answer:

Explanation:

The following program is written in Java. It takes 5 inputs of int values for the ages of each member in the group. Then it loops through all of the ages and chooses the youngest age. Finally, it applies that age as a discount to the final price which would be $50, outputting the final discounted price. The output for the test case provided can be seen in the attached picture below in red.

import java.util.Scanner;

class Brainly

{

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int[] person = new int[5];

       System.out.println("Enter age of individual 1: ");

       person[0] = in.nextInt();

       System.out.println("Enter age of individual 2: ");

       person[1] = in.nextInt();

       System.out.println("Enter age of individual 3: ");

       person[2] = in.nextInt();

       System.out.println("Enter age of individual 4: ");

       person[3] = in.nextInt();

       System.out.println("Enter age of individual 5: ");

       person[4] = in.nextInt();

       int youngest = person[0];

       for (int x = 0; x < person.length; x++) {

           if (person[x] < youngest) {

               youngest = person[x];

           }

       }

       double discount = 1 - (((double)youngest) / 100);

       double output = 50 * discount;

       System.out.println("Total Price: " + output + " the youngest is " + youngest);

   }

}

You might be interested in
ANSWER QUICKLY!
patriot [66]

Answer:

It is bit { measurement used to quantify computer data. }

7 0
3 years ago
It is ok to sell services on Xbox in exchange for real-world money
Sati [7]
Is this a true or false question? If it is let me know and I can help! (:
6 0
3 years ago
Read 2 more answers
Average LCD panels are around _______________, which most monitor authorities consider excellent brightness.
uysha [10]

Answer:

The correct answer to the following question will be option D. 300 nits.

Explanation:

LCD Monitors: LCD stands for Liquid Crystal Display, the display which uses two sheets of liquid crystal with polarizing material between the sheets and also known as Flat panel monitor.

  • Each of the crystal in LCD's is like a shutter, it either allows to pass the light or it blocks the light. There is a fixed type of resolution in LCD
  • LCD panels can be easily moved around all, lightweight, compact and small in size.
  • An average 17-inch LCD monitor could be around 15 pounds, upwards 300 nits which gives the perfect brightness.

So, Option D is the correct answer.

3 0
3 years ago
Differentiate between programming and coding
r-ruslan [8.4K]
Coding means creating codes from one language to another. Programming means to program a machine to perform using a set of instructions.
7 0
3 years ago
Help pls Do you think the current video game industry is likely to experience another ""crash"" (similar to the one in the 1980s
N76 [4]

Answer:

No they are not likely to crash

Explanation:

The video game industry is more advanced than it was back in the 1980s. There have been a great level of improvements in technology in this industry such as things like virtual reality advancements,greater hardware capabilities and alot more capital investments and big players in the industry. This has allowed the industry to grow and become stronger with so much potential, amassing a larger amount of consumers. The crash in the 1980s was a result of limited options in gaming as a result of limited technologies whereby individuals began to switch to personal computers for gaming. This is unlikely to happen now seeing that there have been greater improvements in the industry in terms of gaming technologies and increased variety and options in gaming consoles

5 0
3 years ago
Other questions:
  • Which social media marketing concept engages visitors, getting them to revisit your website and tying them to offline events for
    7·2 answers
  • Why is the stateless nature of the internet a problem for shopping cart software? g?
    5·2 answers
  • The sequence of folders to a file or folder is called a(n) ________
    8·1 answer
  • Which if the following ribbons in Microsoft word is used to add tables and images
    14·1 answer
  • When Tim Berners-Lee developed the first specifications, protocols, and tools for the World Wide Web in 1993, his employers at C
    12·1 answer
  • Ayudaa, 5 ejes de sistemas tecnológicos
    5·1 answer
  • Why does the IPv6 format use letters and numbers?
    12·1 answer
  • Please help im not good at computer class ​
    10·2 answers
  • Two girls were born to the same mother, on the same day, at the same time, in the same month and the same year and yet they're n
    7·1 answer
  • A company database needs to store information about employees (identified by ssn, with salary and phone as attributes), departme
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!