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
hammer [34]
3 years ago
9

Given a one-dimensional array named yearlySalesTotals that contains decimal values, code the first line of a for statement that

declares an index, a Boolean expression for ending the for loop, and an increment expression that lets you use the index to refer to each element in the array.
Computers and Technology
1 answer:
VashaNatasha [74]3 years ago
7 0

Answer:

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

Explanation:

The for statement in has the syntax as given above, it has an int variable indicating the starting index, then a boolen condition ensuring that you don't get out of the array bounds, and an increment operator.

See below a complete program in java that will output all elements of the array  assuming the array yearlySalesTotals contains only ten elements and all indexes has been assigned values.

public class ANot {

   public static void main(String[] args) {

double []yearlySalesTotals = new double[10];

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

   System.out.println(yearlySalesTotals[i]);

   }

}

}

You might be interested in
Create a trigger that prevents anychange(insert, update, or delete)to the grade attribute of the takesrelation that would change
Alchen [17]

Answer:

The trigger code is given below

create trigger F1_Del

after delete on Friend

for each row

when exists (select * from Friend

where ID1 = Old.ID2 and ID2 = Old.ID1)

begin

delete from Friend

where (ID1 = Old.ID2 and ID2 = Old.ID1);

end

create trigger F1_Insert

after insert on Friend

for each row

when not exists (select * from Friend

where ID1 = New.ID2 and ID2 = New.ID1)

begin

insert into Friend values (New.ID2, New.ID1);

end

5 0
3 years ago
Anyone here good with PS4's?
Nookie1986 [14]
I can help you out ! What do you need to know bud ?
6 0
3 years ago
Read 2 more answers
Write a loop that displays all possible combinations of two letters where the letters are 'a', or 'b', or 'c', or 'd', or 'e'. T
Dafna11 [192]

Answer:

for (char outerChar='a'; outerChar<='e'; outerChar++){

for (char innerChar='a'; innerChar<='e'; innerChar++){

cout << outerChar << innerChar << "\n";

}

}

3 0
3 years ago
In order to manage information for a company, your website would need a/an
Eva8 [605]
The answer is database.
3 0
3 years ago
2. What may happen if a large number of computer users are attempting to access a Web site at the same time that you are?
Pachacha [2.7K]
The website may crash if it was not built to sustain a large number of viewers.
6 0
4 years ago
Read 2 more answers
Other questions:
  • he Saffir-Simpson Hurricane Scale classifies hurricanes into five categories numbered 1 through 5. Write an application named Hu
    10·2 answers
  • Live.com is Microsoft's free web-based email provider.<br> A. True<br> B. False
    6·1 answer
  • 14. Convert 11110111 from binary to denary<br> (1 Point)
    12·2 answers
  • Who PLAYS Apex Legend?
    10·2 answers
  • Why when I put a question in the search bar it says something went wrong?
    9·1 answer
  • Give a detailed example of how an app (that you use regularly)uses parameters. You must state the app's name and function, the p
    7·1 answer
  • A data analyst is using the Color tool in Tableau to apply a color scheme to a data visualization. They want the visualization t
    13·1 answer
  • A customer is looking for a storage archival solution for 1,000 TB of data. The customer requires that the solution be durable a
    9·1 answer
  • In which generation microprocessor was developed short answer of computer science​
    7·1 answer
  • Electrical data suitable for transmission is called a(n)
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!