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]
2 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]2 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
"What technology will examine the current state of a network device before allowing it can to connect to the network and force a
slava [35]

Answer:

a network access control

3 0
3 years ago
One of the disadvantages of cable technology is that: while it works well for television signals, it is ineffective for data tra
nignag [31]

Answer:

systems used by many providers require customers to share bandwidth with neighbors

Explanation:

One of the disadvantages of cable technology is that systems used by many providers require customers to share bandwidth with neighbors. This ultimately causes many problems since cables would need to be extended to reach every single user that will be sharing the bandwidth. This would mean cables all over the place. Also, it is very difficult to limit the bandwidth per person, meaning that if anyone is using up all of the bandwidth through the cable, the rest of the individuals connected would not have the bandwidth that they need or are paying for.

7 0
2 years ago
Write a short reflection piece (it may consist of three bulleted items, with one explanatory sentence) on three things you learn
nydimaria [60]

Answers

  • OS(The Operating System) sends <em>interrupts to the processor</em> to stop whatever is being processing at that moment and computer architecture send <em>data bus</em>. This bus sends<u> data between the processor,the memory and the input/output unit.</u>
  • The operating system is a low-level software that supports a <em>computer’s basic functions</em>, such as <u>scheduling tasks and controlling peripherals</u> while the computer architecture has the <em>address bus bar</em>. This bus carries <u>signals related to addresses between the processor and the memory. </u>
  • The interface between <em>a computer’s hardware and its software</em> is its Architecture while An operating system (OS) is<u> system software that manages computer hardware and software resources and provides common services for computer programs.</u>

Explanation:

In short explanation,the Computer Architecture specifically <em>deals with whatever that's going on in the hardware part of the computer system </em>while the Operating System is the computer program <em>which has been program to execute at some instances depending on the programming instructions embedded in it</em>. An example is the MS Office.

5 0
2 years ago
What is security in Technology<br>​
maria [59]

Answer:

IT security is a set of cyber security strategies that prevents unauthorized access to organizational assets such as computers, networks, and data.

3 0
3 years ago
Read 2 more answers
Blank text has a darker apperance than normal texts
sammy [17]
That's cool, I guess. What was the question?
4 0
3 years ago
Other questions:
  • Playville is a tiny town in fictional middle earth, which is inhabited by dwarves and elves. Playville has a playground to which
    6·1 answer
  • You should use _____ software for writing a letter.
    10·1 answer
  • The true or false questions.
    5·1 answer
  • How many inputs are included in the following requirement? REQUIREMENT: Write a program that asks the employee for their age. Th
    6·1 answer
  • I need an answer fast !!! (APEX)
    13·1 answer
  • In a Windows environment, __________ is a powerful tool that enables security administrators to share user and group definitions
    10·1 answer
  • A method that determines if a list is empty in a consistently written linked list class that uses a reference first to point to
    13·2 answers
  • Plz hurry it’s timed
    5·1 answer
  • Who Has any idea How to code?
    7·2 answers
  • ____ is an example of a set of prewritten classes that allows you to access data stored in a database.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!