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
Hoochie [10]
3 years ago
11

Write a for loop to print all NUM_VALS elements of array hourlyTemp. Separate elements with a comma and space. Ex: If hourlyTemp

= {90, 92, 94, 95}, print:90, 92, 94, 95Note that the last element is not followed by a comma, space, or newline.import java.util.Scanner;public class PrintWithComma {public static void main (String [] args) {final int NUM_VALS = 4;int[] hourlyTemp = new int[NUM_VALS];int i = 0;hourlyTemp[0] = 90;hourlyTemp[1] = 92;hourlyTemp[2] = 94;hourlyTemp[3] = 95;/* Your solution goes here */System.out.println("");return;}}
Computers and Technology
1 answer:
slavikrds [6]3 years ago
3 0

Answer:

Here are the for loop for the given question.

 for (i = 0; i < NUM_VALS; i++)  // for loop

       {

         /* check if the value of i is equal to NUM_VALS or not.If it is

         equal then just print the value without comma.*/

       if(i==(NUM_VALS-1))  // if block

       System.out.print(hourlyTemp[i]);

  /* if i is not equal then just print the value with comma.*/

       else   // else block

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

       }

Explanation:

In this we iterating the for loop  and check the condition

check if the value of i is equal to NUM_VALS or not.If it is  equal then just print the value without comma

If i is not equal then just print the value with comma .

Output:

90,92,94,95

You might be interested in
No processo fluido a fluido há outra câmara na saída do material extrudado com pressão menor que a câmara anterior. Isso permite
Vesnalui [34]
What is the question ??????????????????????????????????????????????????????????????
4 0
3 years ago
TolTel Inc., an information technology firm, has created a network that allows its employees to easily access, share, and publis
SpyIntel [72]

Answer:

Intranet

Explanation:

Based on the information provided within the question it can be said that the network created by TolTel Inc. is an Intranet. This is a local or in this case restricted network, that uses Internet software in order to allow those connected to share and publish information. Exactly as TolTel is doing with the private and secure network that they have created for their employees.

6 0
3 years ago
A(n) _____ investigates, analyzes, designs, develops, installs, evaluates, and maintains a company’s information systems.​
Vesnalui [34]

Answer:Systems analyst

Explanation:System analyst is the person in an organization who is responsible for the analysis of the computer system and accordingly testing and giving solution .

He/she is also hired for fulfilling the duties of making the designs , evaluation the solutions, making alternates plan and procedure for the problems, supportive in maintaining the organizational system and its standards.

4 0
3 years ago
What role do computer play in law and order​
kirza4 [7]

Computers on Law & Order tracks computers and computer use through all 456 episodes of the American crime drama Law & Order.

Explanation:

5 0
3 years ago
You are the manager and an employee shows up for his shift dressed inappropriately for work. What should you do?
yarga [219]

Most managers see inappropriate dressing every day. Some are left angered while some are confused as to what is the right way to approach such situations. What follows next needs to be professional oriented. Being the manager, I would start by finding out what the appropriate dressing policies are. Some companies might have dress code policies while others might not. Assuming that this company has, I would read these policies carefully. The next thing that is required from me is to have a small conversation with the employee discretely. As professional as I can be, I will mention how I feel his or her dress code is inappropriate and try to summon the employee by asking him or her whether they are fully aware of the appropriate dress code. I will try to agree with the employee on what is appropriate and what is not. If we agree, requesting the employee to home and change clothes is unnecessary, but if the need to do that arises, I would consider that to be an option.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program to display a message telling the educational level of a student based on their number of years of school. The us
    6·1 answer
  • What is the transfer rate of DDR memory?<br> A. 16 bit <br> B. 32 bit <br> C. 64 bit <br> D. 128 bit
    11·2 answers
  • Which is currently the most common cellular network?<br> 4G<br> 4G LTE<br> 5G<br> 5G LTE
    13·1 answer
  • To put out a minor engine fire, use
    12·1 answer
  • The procedure call mystery(38) will yield which output? __________ a) 0 12 b) 12 0 c) 1 1 0 2 d) 1 1 1 1 e) 2 0 1 1 public void
    11·1 answer
  • find all breweries that specialize in a particular beer style. A brewer is considered specialized if they produce at least 10 be
    5·1 answer
  • Jimmy wrote the procedure scoreToGrade which accepts as a parameter score - a quiz score in the range 0-100. The procedure is su
    8·1 answer
  • In Microsoft Word you can access _ the command to the mini toolbar
    14·2 answers
  • The use of computer in a modern world is as a result of complexity. true or false
    6·1 answer
  • Mike gets along with his co-workers and is always helpful to the clients. He demonstrates good _____.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!