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
PIT_PIT [208]
2 years ago
13

Does anyone know how to write this right? This is for a coding class and I’m super confused on it.

Computers and Technology
1 answer:
vovangra [49]2 years ago
4 0

Answer:

This is using c++ syntax, you might need to make slight adjustment for other languages.

First activity:

string firstSnack = "chips";

string secondSnack = "pizza";

string thirdSnack = "apples";

string bestSnack =  firstSnack;

bestSnack = secondSnack;

Second activity:

double apple = 0.5;

double banana = 0.75;

double orange = 1.43;

double total = apple + banana + orange;

Explanation:

When first declaring a variable, you want to specify the type (such as int, double, string, bool, etc.) and then the name. You can set the variable value in the declaration, or you can set it to a value later in the program by not having the equals sign and whatever comes next.

You might be interested in
To bundle links together in order to improve bandwidth availability and redundancy, what protocol is used
Daniel [21]

Answer:

Link Aggregation Control Protocol

Explanation:

Link Aggregation Control Protocol can be used to assist in the formation of port channel bundles of physical links.

Link Aggregation Control Protocol is an IEEE standard defined in IEEE 802.3ad. LACP lets devices send Link Aggregation Control Protocol Data Units (LACPDUs) to each other to establish a link aggregation connection.

8 0
2 years ago
write a function that returns a list, where each member of list contains previous day’s value multiplied by 2.​
sergeinik [125]

Answer:

Explanation:

The following code is written in Java, the function takes in a list with the previous day's values. The function then uses that list, loops through it and multiplies each individual value by 2 and returns the modified list. The first red  square represents the test case for the function, while the second red square in the image represents the output.

 public static ArrayList<Integer> doubleIt(ArrayList<Integer> mylist) {

       for (int x = 0; x<mylist.size(); x++) {

           mylist.set(x, mylist.get(x)*2);

       }

       return mylist;

   }

5 0
3 years ago
Tuesday
4vir4ik [10]

Answer:

?

Explanation:

these are instructions to a question?

7 0
2 years ago
Why would a store owner want to calculate a mean
chubhunter [2.5K]

Answer:

a store owner would calculate a mean to see the how much a person spends

Explanation:

4 0
2 years ago
, , ,g d,t ,dt m,dt ymtd
maks197457 [2]

Answer:ummm me confused

Explanation:

4 0
3 years ago
Other questions:
  • Which would cause a decrease in the quantity of computers supplied?
    15·2 answers
  • How do you fix this windows 7 screen​
    8·1 answer
  • Given that ∠XQR = 180° and ∠LQM = 180°, which equation could be used to solve problems involving the relationships between ∠XQM
    6·1 answer
  • What does the acronym GIF stand for? Graphics Interface Format Graphics Interchange Format Going Into Files Gathering Informatio
    12·2 answers
  • 13.
    8·1 answer
  • _ models are non visual ways of communicating how someone thinks about something in the natural world
    12·1 answer
  • PLEASE HELP SOMEONE!!!!!!!!! WILL GIVE BRAINLIEST!!!!!!!!!!!!!!!!!!!!!!!!! Fill in the blanks.
    15·1 answer
  • What does it mean to be a good cyber citizen?
    8·2 answers
  • Design algorithm and the corresponding flow chart for adding the subject score of 5, total value and rank.​
    14·1 answer
  • The arrangement of keys on a keyboard, QWERTY reflects the keyboard layout by ________. Group of answer choices using the letter
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!