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
What is the answer for this
tigry1 [53]

Answer:

No, not that one. Try again.

Explanation:

string comparison is case sensitive.

8 0
2 years ago
Question # 2
mezya [45]
To state the main idea of what you read in your own words
8 0
2 years ago
Ontext clues can be used to determine the _____ of an unfamiliar word
Solnce55 [7]
Meaning of the word.

6 0
3 years ago
Write an ALTER TABLE statement that adds two new columns to the Products table: one column for product price that provides for t
matrenka [14]

Answer:

ALTER TABLE Products

ADD Products_price float(5,2) DEFAULT 9.99,

ADD Adding_time datetime;

Explanation:

So at first we need to use ALTER TABLE statement, when we use this statement we also need to provide the table name. In this case, i assume it is 'Products'.

Then, as per question, we need to add two columns.

The first one is 'product_price' and it contains decimal points. So, we need to use ADD statement and give a column name like 'Prodcuts_price' and its datatype 'float' because it contains decimal or floating points. so, for 3 digits on the left and 2 digits on the right, it makes a total of 5 digits. So, we need to declare it like this. (5,2) it means a total of 5 digits and 2 after the decimal point. after that, we need to set our Default value using the DEFALUT statement. so DEFAULT 9.99. it will set the default value to 9.99 for existing products.

And for our next column, we give its a name like 'Adding_time' then it's datatype 'datetime' because it will contain date and times.

8 0
3 years ago
What are Operating Systems?
horrorfan [7]

Answer:

the software that supports a computer's basic functions, such as scheduling tasks, executing applications, and controlling peripherals.

5 0
2 years ago
Other questions:
  • How to build an arch bridge​
    5·1 answer
  • How does a color change if you add more gray to it
    7·1 answer
  • Get these points why they hot!!!!!!!!!!!!!!!!!!!!
    14·2 answers
  • Write a class named Car that has the following member variables: - yearModel. An int that holds the car’s year model. - make. A
    6·1 answer
  • Which of the following is used to describe an authentication scenario in which a user logs in using a PIN and a security token
    7·2 answers
  • While doing research on the Internet, what kind of website should you avoid because the information may be biased?
    11·1 answer
  • For the recursive method below, list the base case and the recursive statement, then show your work for solving a call to the re
    8·1 answer
  • What will be the output of the following code?
    14·1 answer
  • ____ is a technology that exists inside another device
    9·2 answers
  • You are designing an exciting new adventure game and you want to attempt to explain where items that are carried by the player a
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!