You want to read input from the user to know how many apples they would like
to buy. Which statement should you use to read in a number from the user?
var applesToBuy = readLine("How many apples would you lik
e? ");
o
var applesToBuy - println("How many apples would you like?
Dj
var applesToBuy - readInt("How many apples would you like?
1);
var applesToBuy
= nextInt("How many apples would you like?
")

Answers

Answer 1

Answer:

var applesToBuy = readLine("How many apples would you lik

e? ");

Explanation:

It asks the user to enter answer the question and it stores the answer into the applesToBuy variable.

Its right dont worry.

Answer 2

In the given scenario, if we use "InputStream" class object that inputs value from the user-end, in which we use "readInt" keyword. In Java, this function of the DataInputStream class reads 4 input bytes and returns an integer value. This method takes the next 4 bits from the input stream, transforms them to integers, and would then returns.

And the wrong choice can be defined as follows:

For choice 1, it use the "readLine" method which inputs the string value.For choice 2, it use the "println" method which prints value.For choice 4, the "nextInt" method is the part of "Scanner" class.

Therefore, the answer is "Option 3", which is  "var applesToBuy - readInt("How many apples would you like?");".

Learn more:

brainly.com/question/20637377


Related Questions

Match the data type to the given data.
1. float
2. array
3. Boolean
4. character

false
с
c, o, m, p, u, t, er
26.2

Answers

Float: 26.2
Array: c, o, m, p, u, t, er
Boolean: false
Character: c

When query data is exported to a document it is most effectively displayed in a
file.
paragraph.
text field.
table.

Answers

Answer:

The answer is "file".

Explanation:

The query data would be a collected data and data action, in which users are using a query in needed to respond to a reasonable question, adjust, combine data from a table or indeed to join, change, or erasing table data, consequently, this is most derive conclusions in a file so if query data are exported to the document, that's why the other choices were wrong.

compared to EMT, IMC is?​

Answers

When compared to EMT, IMC (intermediate metal conduit) is a thinner and also have a lighter-weight .

What is the comparison in IMC vs. EMT

Note that EMT  is one that cannot be threaded and is not set up for strong connections like IMC and RMC.

In regards to residential wiring, IMC is known to be the one that is said to be often and usually limited to service entrance assemblies as well as exposed and it often  runs to and fro.

Therefore, When compared to EMT, IMC (intermediate metal conduit) is a thinner and also have a lighter-weight .

Learn more about metal conduit from

https://brainly.com/question/5023977

#SPJ1


When developing a naming convention, what is the most important quality to keep in mind?

Answers

Answer:

Files should be named consistently.

File names should be short but descriptive.

Avoid special characters or spaces in a file name .

Use Capitals and Underscore instead of periods or spaces or slashes.

What episode and Season of Simpsons is this

Answers

Answer:

season 9 episode 23.65 and the bases it 12

Choose all items that represent common website
design flaws.
menu at the top of the page
distracting background
short page-load times
too many or confusing fonts
poor navigation
dead hyperlinks

Answers

Isn’t it basically all of them haha?

Answer:

2,4,5,6

Explanation:

just answered it

Implement the ArrayMethod application containing an array that stores eight integers. The application should call the following five methods: 1. display - should display all the integers 2. displayReverse - should display all the integers in reverse order 3. displaySum - should display the sum of the integers 4. displayLessThan - should display all values less than a limiting argument 5. displayHigherThanAverage - should display all values that are higher than the calculated average value.

Answers

Answer:

public static void display(int [] arr){

   System.out.print("Arrays: ");

       for(int i =0;i<arr.length;i++){

           System.out.print(arr[i]+" ");

       }

       System.out.println();

   }

   

public static void displayReverse (int [] arr){

   System.out.print("Arrays in reverse order: ");

       for(int i=arr.length-1;i>=0;i--){

           System.out.print(arr[i]+" ");

       }

       System.out.println();

   }

   

public static int displaySum (int [] arr){

   System.out.print("Sum: ");

   int sum = 0;

       for(int i =0;i<arr.length;i++){

           sum+=arr[i];

       }

       return sum;

   }

   

public static void displayLessThan (int [] arr, int num){

       System.out.print("Less than "+num+": ");

       for(int i =0;i<arr.length;i++){

           if(arr[i]<num){

               System.out.print(arr[i]+" ");

           }

       }

       System.out.println();

   }

public static void displayHigherThanAverage  (int [] arr){

       System.out.print("Higher than average: ");

       int sum = 0;

       for(int i =0;i<arr.length;i++){

           sum+=arr[i];

       }

       float average = sum/arr.length;

       for(int i =0;i<arr.length;i++){

           if(arr[i]>average){

               System.out.print(arr[i]+" ");

           }

       }

       System.out.println();

   }

Explanation:

The methods were written in Java. See attachment for explanation where I used comments to explain each lines.

Note that lines that begin with double slash (//) are comments

Is a defense of a political position an argument

Answers

Answer:

yes

Explanation:

yyyyyyyyyyeeeeeeeeesssssss

What is the final gear reduction of a compound gear reduction of 36 to 12 for the first stage and 60 to 12 for the second stage?
A. 0.067
B. 0.533
C. 8
D. 15

Answers

Answer:

8

Explanation:

Gear reduction = driven gear teeth / driving gear teeth

First stage reduction :

Driven gear teeth = 36

Driving gear teeth = 12

36 /12 = 3

Second stage reduction :

Driven gear teeth = 60

Driving gear teeth = 12

60 /12 = 5

First stage + second stage

3 + 5 = 8

Select the correct answer.

Which of these is an adventure game?

A.
Duck Hunt
B.
Tetris
C.
Myst
D.
Sudoku

Answers

Answer: C. Myst because it is an adventure game
The answer is c: myst because it’s an adventure game.

which of the following is not a benefit of aws cloud computing​

Answers

Answer: High latency, temporary and disposable resources are not the benefits of AWS cloud computing.

Explanation: AWS is the most reliable and broad platform that offers a wide range of feature services to individuals globally.

Hope this helps (:

If you want the input gear to spin in the same direction as the output gear you must use a _______ gear.
A. Spur
B. Bevel
C. Driven
D. Idler

Answers

Answer:B

Explanation:

Help fast

When comparing and what is the main difference?
O The first symbol is for reviewing text and the second for enlarging text.
The first symbol is for spacing and the second for sizing.
O The first symbol is for viewing text and the second for inserting text.
O The first symbol is for inserting text and the second for viewing text.

Answers

Answer:

The first symbol is for inserting text and the second for viewing text

Explanation:

Write a C console application that will be used to determine if rectangular packages can fit inside one of a set of spheres. Your program will prompt the user for the three dimensions that define a rectangular box; the length, the width, and the height. The interior diameter of a sphere is used to identify its size. Spheres are available in the following five sizes: 4- inch, 6-inch, 8-inch, 10-inch, and 12-inch. Your program will execute repeatedly until the user enters a value of zero for one or more of the rectangular box dimensions. After obtaining the dimensions of the rectangular box, your program will call a function named getSphereSize that determines if the box will fit inside one of the five spheres. The formula for calculating the diagonal of a rectangular box is:

Answers

Answer:

#include <cmath>

#include <iostream>

using namespace std;

int getSphereSize(double length, double breadth, double height) {

   double diagonal = sqrt(length * length + breadth * breadth + height * height);

   if (diagonal <= 4)

       return 4;

   if (diagonal <= 6)

       return 6;

   if (diagonal <= 8)

       return 8;

   if (diagonal <= 10)

       return 10;

   if (diagonal <= 12)

       return 12;

   return 0;

}

int main() {

   double length, breadth, height;

   int sphereCounts[5] = {0};

   int sphereSize;

   while (true) {

       // Get dimensions of the box

       cout << "Enter the dimensions of the box:\n";

       cout << "Length: ";

       cin >> length;

       cout << "Breadth: ";

       cin >> breadth;

       cout << "Height: ";

       cin >> height;

       if (length <= 0 || breadth <= 0 || height <= 0)

           break;

       sphereSize = getSphereSize(length, breadth, height);

       if (sphereSize == 0)

           cout << "The box cannot fit in any of the spheres";

       else

           cout << "The box can fit in the " << sphereSize << "-inch sphere";

       // Increment the counter

       if (sphereSize == 4)

           sphereCounts[0]++;

       else if (sphereSize == 6)

           sphereCounts[1]++;

       else if (sphereSize == 8)

           sphereCounts[2]++;

       else if (sphereSize == 10)

           sphereCounts[3]++;

       else if (sphereSize == 12)

           sphereCounts[4]++;

       cout << "\n\n";

   }

   cout << "\nNumber of 4-inch spheres: " << sphereCounts[0];

   cout << "\nNumber of 6-inch spheres: " << sphereCounts[1];

   cout << "\nNumber of 8-inch spheres: " << sphereCounts[2];

   cout << "\nNumber of 10-inch spheres: " << sphereCounts[3];

   cout << "\nNumber of 12-inch spheres: " << sphereCounts[4];

   cout << endl;

   return 0;

}

Explanation:

The "cmath" library is included in the c++ program. The getSphereSize function is used to return the sphere size the rectangle dimension can fit into. It program continuously prompts the user for the length, breadth, and height of the rectangle and passes the values to the getSphereSize function in the while but breaks if any or all of the variable value is zero.

The sizes of the sphere objects in inches are collected in an array of five integer values of zeros and are incremented by one for every match with a rectangle.

If we use 6 bits for representing positive and negative numbers using 2's
complement methods, what is the value of 11100?

Answers

Answer:

-4


Explanation:
In binary, 11100 is 28
But in the two’s complement method, it will equals = (-4).
the last number always represents negative number.
In other words, if this (101010) with 6 digits. Without using two’s complement method, it would be 42 in binary. But with two’s complement method, it would ( - 22)


I hope this helps. Please don’t hesitate to ask if u concerning my answer
Yeeeeeeeeeeeeeeeeeeeeeeee

If you wanted to use the numeric key pad to multiply 8 and 5 and then divide by 2, you would type
1. 8/5*2
2. 5/2/8
3. 8*5*2
4. 8*5/2

Answers

Answer:

Option 4 would be your best answer

Explanation:

The * means multiply

And the / means Divide

Hope this helps :D

4) 8*5/2 would be the correct answer to your question

Mrs. Toma is preparing a marksheet of Final term using Excel. She needs to 1
add a new subject title in the worksheet. Now, which component does she
need to add in her marksheet?

Answers

Answer:

a

Explanation:

Choose all items that represent essential tasks to do after an interview is over.
Send copies of the resume and cover letter.

Construct a career portfolio.

Ask about next steps and the best way to communicate.

Phone each person interviewed.

Send a follow-up email within 24 hours.

Submit the job application.

Answers

Answer:

Ask about next steps and the best way to communicate.

Send a follow-up email within 24 hours.

Explanation:

An interview is a well-organized conversation where one participant asks questions, and the other person gives answers to those questions.

Essential tasks that need to be done after an interview is over are as follows:

1. Ask about next steps and the best way to communicate.

2. Send a follow-up email within 24 hours.

Answer:

Ask about next steps and the best way to communicate.

Send a follow-up email within 24 hours.

“Jon is a DJ and he spends a lot of time traveling around the country to perform at concerts and festivals. He has a large music collection which he must be able to easily transport with him wherever he goes.” [6 marks]
Please answer

Answers

Answer:

there is no exact question to answer here i could help you if you explained it more in the comment section of this answer! sorry!

Explanation:

“Jon is a DJ, and he spends a lot of time traveling around the country to perform at concerts and festivals. The best storage device for him is the hard disk.

What is a hard disk?

A hard disk, also known as an HDD, is a non-removable, rigid magnetic disk with a large data storage capacity. While a Compact Disc is a small plastic disc on which music or other digital information is stored in the form of a pattern of metal-coated pits that can be read using laser light reflected off the disc.

A hard disk is a large plastic disc on which music or other digital information is stored. By moving all parts of a file to contiguous blocks and sectors, a good defragmentation utility can reduce access time.

Therefore, "Jon is a DJ who spends a lot of time traveling across the country performing at concerts and festivals." A hard disk is the best storage device for him.

To learn more about the hard disk, refer to the below link:

https://brainly.com/question/14867477

#SPJ2

The question is incomplete. Your most probably complete question is given below:

What is the best storage device for him?

Help plz brainliest.

Answers

Answer:

Follows are the solution to this question:

Explanation:

In this question, the equation will be written as the coefficients for each of the bases, that is from the above quantum states b is given as follows:

[tex]\to | b \rangle = 0.4 | 00 \rangle + 0.65 | 01 \rangle + 0.2 | 10 \rangle + 0.61 | 11 \rangle[/tex]

Therefore the equation can be written as in the state b:

[tex]\to \mathbf{state_b = [0.4, 0.65, 0.21, 0.61]}[/tex]

Audio texts use:

A. Sound and music
B. More than a medium
C. Media that activates all the senses
D. Color and Images

Answers

Answer:

a

Explanation:

Where are the kidneys located?
a) Attached to the bladder
b) Lower back
c) Upper back
d) Middle back
e) Chest cavity
f the following is acian of health

Answers

Answer:

B

Explanation:

Your kidneys are fist-sized organs shaped like beans that are located at the back of the middle of your trunk, in the area called your flank. They are under the lower part of your ribcage on the right and left sides of your backbone.

Write a program that reads in ten numbers from the user and displays the distinct numbers. If a number entered by the user appears multiple times, your program needs to filter the repeated numbers and therefore displaying the repeated numbers only once. For example, if the user enters the number 1, 4, 6, 1, 8, 4, 2, 1, 3,9 then the output of your program should be: 1, 4, 6, 8, 2, 3, 9.

Answers

Answer:

Here you go :)

Explanation:

Change this however you'd like:

array = []

for n in range(10):

   x = int(input("Enter integer: "))

   array.append(x)

dup = set(array)

print(", ".join(str(i) for i in dup))

multiple keys may represent a primary key true or false​

Answers

The answe is true
I believe

What are the challenges of giving peer feedback in peer assessment

Answers

Feeling of underachievement

Answer:

There can some challenges when giving and receiving peer feedback in a peer assessment. Some people can be harsh in their assessments of your work. Some students cannot take that and because of that it can cause them to question a lot of their work. People can also be wrong when it comes to the assessment

The steps.txt file contains the number of steps a person has taken each day for a year. There are 365 lines in the file, and each line contains the number of steps taken during a day. (The first line is the number of steps taken on January 1st, the second line is the number of steps taken on January 2nd, and so forth.) Write a program that reads the file, then displays the average number of steps taken for each month. (The data is from a year that was not a leap year, so February has 28 days.)

Answers

Answer:

In Python:

file = open('steps.txt', 'r')

readLine = file.readlines()

begin = 0

mdays = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)

print("Month"+"\t\t"+"Average Steps")

for m in range(len(mdays)):

end = begin + mdays[m]

steps = readLine[begin:end]

sumsteps = 0

for s in steps:

 sumsteps = sumsteps + int(s)

 

average = round(sumsteps/mdays[m],1)

print(str(m+1)+"\t\t"+str(average))

begin = begin + mdays[m]

Explanation:

This line opens the step.txt file

file = open('steps.txt', 'r')

This reads the content of the file

readLine = file.readlines()

begin = 0

This initializes the months of the days to a tuple

Mmdays = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)

This prints the header

print("Month"+"\t\t"+"Average Steps")

This iterates through the tuple

for m in range(len(Mmdays)):

This calculates the days in each month

end = begin + Mmdays[m]

This gets the number of steps in each month

steps = readLine[begin:end]

This initializes the number of steps to 0

sumsteps = 0

This iteration sums up the number of steps in each month

for s in steps:

 sumsteps = sumsteps + int(s)

This calculates the average of steps rounded to 1 decimal place  

average = round(sumsteps/Mmdays[m],1)

This prints the calculated average

print(str(m+1)+"\t\t"+str(average))

This calculates the beginning of the new month

begin = begin + Mmdays[m]

few toffees were distributed among oriya , piyush and payal . priya got 3/8 , piyush and payal 1/8 and 1/2 of total toffees respectively. who got the maximum toffees​

Answers

Answer:

it is payal because 1/2 is a half

Explanation:

there you go

Name a type of malware designed to provide unauthorized , remote access to a user's computer

Answers

This is called Remote Access Trojan.

Photographs that are too dark or too light can be difficult to fix with photo-editing software.
True
False

Answers

The answer is true :)
True. ———-///———-//————

are used for mechanical power transmission over long distances
A. Spur Gears
B. Helical Gears
C. Planetary Gears
D. Chain and Sprockets

Answers

Answer:

D. Chain and Sprockets

Explanation:

Chains and sprockets are power transmission tools. The roller chain is connected to a toothed wheel which is the sprocket. The combination provides mechanical power to the wheels of vehicles.

An advantage they possess is their ability to transmit mechanical power over both short and long distances. They have a high degree of efficiency but they require constant lubrication. They also produce noise during operation.

Other Questions
Solve the inequality by stating the solution and graphing it.3 5x < -4x + 9 Can someone give me basic info on the Completion of the Transcontinental Railroad Thanks and I hope you're doing amazing :DD What is a big factor in why the Arctic is warming twice as fast as the rest of Earth? Mary was prescribed painkillers after she broke her leg. once her leg though, Mary continued to take the painkillers because she felt like she needed them to fell normal. what type of need is Mary experiencing?A. Healthy needB. Negative needC. DependencyD. Schedule The sales tax rate is 6.3%. Rosa buys a shirt priced as $108, what is her total cost including tax (nearest hundredth) I talked with the major and learned that when it should start and our cars should be loaded we would drivethem back along the screened road and up to the main road along the ridge where there would be a post andother cars to clear them.What effect does the style of this long sentence achieve?O The long-winded rant paints an image of a narrator who is less than stable.o The style reflects the mundane actions and events of daily life in a war zone.O The choice of simple words adds realism by mimicking the way people speak in real life.The uninterrupted action mirrors how the orders will be carried out when the time comes Select all the equations that represent the hanger. Which of the resolution to the story's conflicts are ironic? The Ransom of the Red Chief Find x in triangle ABC using geometric means. The sum of two numbers is 30 and their difference is 4. Find the numbers What is a positive and negative interface of Apple, Microsoft, Linux GUI What is the measure of the indicated angle ? okay, pls dont delete! for my art 2 class, i need to ask people for constructive criticism on traits for a random person! my parents are at work so im asking yall! pls be honest, and dont report! What Spanish word is in reference to corn? OJO! los tres choclo maz elote Pleaseee helppp answer correctly !!!!!!!!!!!!!!! Will mark Brianliest !!!!!!!!!!!!!!!!!! Please choose the correct answer acceptable imagery to draw in your home? Julien est journaliste. Lintonation ascendante : Julien est journaliste ? Question avec est-ce que : Est-ce que Julien est journaliste ? Linversion du sujet : Est-Julien journaliste ? Tu aimes le chocolat. Lintonation ascendante : Tu aimes le chocolat ? Question avec est-ce que : Est-ce que tu aimes le chocolat ? Linversion du sujet : Aimes-tu le chocolat ? Vous restez la maison. Lintonation ascendante : Vous restez la maison ? Question avec est-ce que : Est-ce que vous restez la maison ? Linversion du sujet : Restez-vous la maison ?Julien est journaliste. Lintonation ascendante : Julien est journaliste ? Question avec est-ce que : Est-ce que Julien est journaliste ? Linversion du sujet : Est-Julien journaliste ? Tu aimes le chocolat. Lintonation ascendante : Tu aimes le chocolat ? Question avec est-ce que : Est-ce que tu aimes le chocolat ? Linversion du sujet : Aimes-tu le chocolat ? Vous restez la maison. Lintonation ascendante : Vous restez la maison ? Question avec est-ce que : Est-ce que vous restez la maison ? Peux-tu vrifier? Merci The animal-like parasite plasmodium causes the disease 1) A craftsman makes 40 items in 8 hours. How manyhours will he take to make 75 items?