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
lina2011 [118]
3 years ago
11

How do I write this code in java? input "Enter Your Age to Order a Beer"

Computers and Technology
1 answer:
Klio2033 [76]3 years ago
5 0

Answer:

i dont know sorry but answer above lol

Explanation:

You might be interested in
Using the scenario below, answer the following questions:
4vir4ik [10]

Answer:

Here is code in java.

import java.util.*;

class Main

{

public static void main (String[] args) throws java.lang.Exception

{

   try{

         boolean flag=false;

         int total_mile=0;

         double avg_mile;

       // part 1, create and initialize array

       int inp[]={2,5,9,11,13,17,20,22,24,26};

       

       System.out.print("miles ran per week: ");

       // print the miles per week of train

       for(int x=0;x<10;x++)

       {

       System.out.print(inp[x]+" ");

       }

        System.out.println();

       //part 2, print the value of index 2 in the list

       System.out.println("value at index 2: "+inp[2]+" miles");

       //part 3, find length of array

       System.out.println("list length: "+inp.length);

     

       // part 4, calculate total mile and average

       for(int y=0;y<10;y++)

       {

       total_mile=total_mile+inp[y];

       }

       System.out.println("total miles ran: "+total_mile+" miles");

       

       avg_mile=total_mile/10.0;

       System.out.println("average no of miles ran= "+avg_mile+" miles");

       

     // part 5, check 4 exist in the list or not

       for(int k=0;k<10;k++)

       {

       if(inp[k]==4)

       {

       flag=true;

       break;

           }

       }

           if(flag)

           System.out.println("4 exist in the list.");

           else

            System.out.println("4 doesn't exists in the list.");  

       

   }catch(Exception ex){

       return;}

}

}

Explanation:

Create and initialize array with list value equals to 2 and maximum value 26. Print the miles of each week.Then find the value of miles at index 2 in the list.Next find the length of the array and print it.Calculate total miles ran of 10 weeks.Then calculate the average miles by dividing the total with 10. In the array, check 4 exist or not.

Output:

miles ran per week: 2 5 9 11 13 17 20 22 24 26                                                                            

value at index 2: 9 miles                                                                                                  

list length: 10                                                                                                            

total miles ran: 149 miles                                                                                                

average no of miles ran= 14.9 miles                                                                                        

4 doesn't exists

3 0
3 years ago
What is the HTML tag used to define a block of content?<br> O <br> O class<br> O #id<br> O
allsm [11]
Are there any other options
7 0
2 years ago
Read 2 more answers
When doing a complex presentation, which of the following would be the best tool to begin designing your presentation?
Tomtit [17]

Answer:

B.) Open Office Impress

Explanation:

The options are:

A.) Open Office Writer

B.) Open Office Impress

C.) an outline

D.) photographs

Out of the above, the Impress is used for doing complex presentation, and its one of the best tool for it like PowerPoint. Its quite the same as PowerPoint, and it supports both ppt format as well as odp or the open document presentation format. You can make very complex presentations with the help of the Open office Impress.

7 0
3 years ago
Read 2 more answers
Setting financial priorities and goals will help you save money for future needs <br> True or false?
allsm [11]
Hey there!

Here is your answer:

<u><em>The proper answer to this question is option A "true".</em></u>

Reason:

<u><em>Financial priorities, and goals would help make a person more money. Goals would include: Opening bank accounts, adding money to some sort of fund, or putting money into a bank account.</em></u>

<em>Therefore the answer is option A!</em>

If you need anymore help feel free to ask me!

Hope this helps!

~Nonportrit 
3 0
3 years ago
What are experts in technology who use their knowledge to break into computers and networks, for profit or just as a challenge k
insens350 [35]

Answer:

Hacker

Explanation:

Hacker -

It refers to the computer software expert , who is responsible to break into the unauthorized networks or computer , is referred to as a hacker .

The hacker is skilled with exceptional computer and computer software knowledge .

Hacking is an illegal practice , as the person is able to access some confidential and personal data and information of any other person or organisation .

Hence , from the given information of the question ,

The correct term is hacker .

3 0
3 years ago
Other questions:
  • The highly advanced decision support feature integrated within an electronic information system would support which activity?
    9·1 answer
  • Thomas asked his friend for a software suite. His friend had the software suite in his computer and he copied it into a small, r
    11·1 answer
  • Which of these statements is true? Steve Jobs invented the mouse as an input device. Bill Gates invented the mouse as an input d
    6·1 answer
  • What does it mean to say that two variables are negatively correlated?
    6·1 answer
  • Why should characters be avoided in file names
    11·1 answer
  • Aapke question about computer keyboard​
    5·1 answer
  • one data is in memory the computer interpets and executeinstructions to process the data into informationA. TrueB. False
    8·1 answer
  • You have a large TCP/IP network and want to keep a host's real time clock synchronized. What protocol should you use?
    10·1 answer
  • Any material that comes into contact with the body must be __________.
    6·1 answer
  • What is one way a pivottable could combine the following data?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!