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

First activity:

1. Declare three variables: firstSnack,
second Snack, and thirdSnack.
Assign the name of a snack (as a string)
to each variable.

2. Declare another variable and call it
bestSnack.
Assign a value to bestSnack USING THE
NAME OF ONE OF THE ABOVE VARIABLES.
Do not use a string directly.

3. Now, change your mind! Reassign the value
of bestSnack, again using the variable name,
not the string. (THIS SHOULD BE DONE ON
A NEW LINE)

Second activity:

4. Declare three variables and give them the names of three common grocery items. Assign to each variable a NUMBER value approximately its price. Don’t use $ sign, just the actual number.

5. Declare another variable, name it total, and assign to it the SUM of the three other variables, contain. Hint - you’ll need to use an arithmetic operator to do this.

Answers

Answer 1

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.


Related Questions

did someone actually hang themselves on the wizard of oz set

Answers

No - its a rumour started since the films 50th anniversary in 1989.

what sort of software programs are used to determine are of origin

Answers

Answer:

Explanation: Tools used to determine area of convergence and area of origin include: Elastic strings and protractors. Mathematical equations - (tangent trigonometric function) Computer software programs such as BackTrack™ or Hemospat.

search engines use software that combs the web to find webpages and add new data about them to the database. what is this software called?

Answers

Answer:

They basically use a technology called spider or web crawling, it basically just comb through the internet to find websites or webpages.

please give brainliest.

Please need help!!!!!

Which one of these statements regarding the phases of development is true?

A.
The pre-production phase starts after the prototype phase.
B.
The beta phase starts after the alpha phase.
C.
The alpha phase starts after the gold phase.
D.
The concept phase starts after the pre-production phase.
E.
The production phase starts after the beta phase.

Answers

Answer:

Try the answe D because before you start you will need a concept.

It should be noted that the statements regarding the phases of development is true is D; The concept phase starts after the pre-production phase.

According to the given question, we are to discuss the phases of development that are involved.

As a result of this ,we can see that, concept phase starts after the pre-production phase, during thus process, there should be a pre-production that helps to have an idea of the whole process.

Therefore, The concept phase starts after the pre-production phase of development in programing process.

Learn more about phases of development at;

https://brainly.com/question/16397886

How would you rate your prior knowledge or comfort level with the topic of technology applications?


A.

I am a technology application expert.

B.

I know a lot, but not everything about technology applications.

C.

I know a few things about technology applications.

D.

I am not familiar at all with technology applications.

Answers

Answer:

A

Explanation:

I know cyber security and Javascript and also a framework called svelte to create websites.

cui documents must be reviewed to which procedures before destruction?

Answers

Answer:

Documents containing CUI must be destroyed by shredding..

Explanation:

Hope it helps you..

Your welcome in advance..

(ㆁωㆁ)

The procedure before the destruction of the CUI document will be Records Management.

What is the CUI documents procedure?

Any CUI must go through the Records Management processes before it may be deleted. It must be determined if it is transient or persistent and then treated accordingly. Agencies are required to destroy CUI in a way that makes it unrecoverable, unreadable, and indecipherable, even when information is in electronic form.

Agencies are required to apply the procedure specified by law, legislation, or government-wide policy when destroying records. Cross-cut shredding that results in particles that are 1 mm x 5 mm (or less) in size or crushing are two techniques that have been authorized for eliminating paper-based CUI.

To acquire regulatory advice for records management and destruction processes, go to the course resources.

The CUI document must be reviewed to which procedures before destruction by Records Management.

More about the CUI documents procedure link is given below.

https://brainly.com/question/29871876

#SPJ12

which type of broadband internet offers connections nearing the speed of light?

Answers

Answer:

FiberOptic connections

Explanation

One of the fastest data transfer methods for computers.

The type of broadband internet that offers connections near the speed of light is fiber-optic. The correct option is c.

What is fiber-optic?

Information can be sent from one location to another via optical fiber. Communications over the internet, cable television broadcasts, and telephone calls all use it.

Data transmission through the internet is one typical application. Most likely, a fiber optic cable connecting my computer and Brainly's servers to your browser allowed it to obtain this webpage.

Fiber optics is used in communications, medicine, optical inspection, lighting, and in the making of sensors. The Internet is a connection of computers from different places without wires. It is transferring information.

Therefore, the correct option is c. fiber-optic.

To learn more about fiber-optic, refer to the link:

https://brainly.com/question/10062531

#SPJ2

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

Cable.

DSL.

fiber-optic.

satellite.

A document used to convince a panel of potential funders to help a product, programor service become reality.

Answers

Answer:

Concept paper

Explanation:

what are the unique ICT needs for casinos?

Answers

Answer:

This is one of those slot game developers that not only create games, but it also creates entire platforms for online casinos and they have to pay for the games.

Explanation:

Why would you browse by entering a URL rather than use a link in a Web page

Answers

Answer:

Rather than entering a URL in a web browser, I prefer to browse the webpage. Because if you do browse in the browser you can see other alternative options to that website.

where should the works cited page appear in the document?

Answers

Answer:

The Works Cited Page should be the last page of the documents (and it should be a separate page on its own, not just at the bottom of the essay).

unable to find valid certification path to requested target

Answers

Answer:

Explanation:

This issue might arise if you are using a self-signed certificate or a certificate that's been issued by an internal certificate authority, or if your clients (e.g., browser, Java) are outdated. Trust is handled by having the root and intermediate certificates of your SSL certificate on a trusted keystore.

what is the answer ?????​

Answers

Answer:

1) Driver or option D

2) Kindle or option C

please help me i will give brainly

Answers

Answer:

CPU: central processing unit.

Operating System: system software that is installed on a computer to control and organize its component parts.

RAM: random access memory.

save as: command in the File menu that enables users to save their file to a different location.

Folder: an object that contains multiple documents or files.

icons: pictures that represent different commands or actions that you want the computer to perform.

Directory: index of all the files stored on the computer.

FAT: an organizational system used to organize files.

Order the steps to describe how to import a contact list in Outlook 2016.

Answers

Answer:  above is correct

In Backstage view...

Click Import/Export

Choose Import from...

Select CSV format...

Choose a destination....

Explanation:

The steps followed to import a contact list in the Microsoft Outlook 2016 are:

In background view, click open and export.Click import/ export.Choose import from another program.Select CSV format, and browse for a file list.Choose a destination folder, and click Finish.

What is Outlook 2016?

The Microsoft Outlook 2016 is a software system that helps the users to manage  their personal information. There are various functions of outlook such as manage emails, contact managing, journal logging and many more.

The Microsoft outlook allows the user to import the contact list into their personal computer by following the steps as mentioned above.

Learn more about Microsoft Outlook , here:

https://brainly.com/question/26695071

#SPJ2

Two structural members that cross each other when strengthening structures A. Triangulation B.cross bracing C.Lintel D.cantilever​

Answers

Cross bracing I think

what feature is required to track customer search terms on a website?

Answers

Answer:

Site Search feature is required to track customer search terms on a website..

Explanation:

Hope it helps you..

Your welcome in advance..

(ㆁωㆁ)

Draw a flow chart showing the conversion of temperature from farenheit to degree celsius

Answers

I hope this answers help you

Consider the following declarations:

class bagType
{
public:
void set( string, double, double, double, double);
void print() const;
string getStyle() const;
double getPrice() const;
void get( double, double, double, double);
bagType();
bagType(string, double, double, double, double);
private:
string style;
double l;
double w;
double h;
double price;
};
bagType newBag; // variable declaration

Requried:
a. How many members does class bagType have?
b. How many private members does class bagType have?
c. How many constructors does class bagType have?
d. How many constant functions does class bagType have?
e. Which constructor is used to initialize the object newBag?

Answers

Answer:

12, 5, 2, 3

bagType

Explanation:

I just did it

The light in a room must be turned on when there is one or more person in the room and turned off the rest of the time. A sensor is used to detect if there is someone in the room. Describe the use of a microprocessor to control the light in the room.

Answers

Answer:

ZOO WEE MAMA

Explanation:

ZOO WEE MAMA 23

did someone really hang themselves on wizard of oz

Answers

i think so the cast is def scary

Which is considered both an input and output device?

Keyboard
Microphone
Speaker
Touchscreen monitor

Answers

Answer: touchscreen monitor

Explanation:

devices are the pieces of hardware used by a human (or other system) to communicate with a computer. For instance, a keyboard or computer mouse is an input device for a computer, while monitors and printers are output deviceshope this help.

Answer:

Touchscreen monitor

Explanation:

You touch it to input commands since it's a touchscreen and it is also a visual output device that interprets data into a picture.

Hope this helps :)

if you could travel back in time where would you go? what would you do? explain

Answers

Answer:

I would challenge the temporal paradox.

Explanation:

A temporal paradox, time paradox, or time travel paradox is a paradox, an apparent contradiction, or logical contradiction associated with the idea of time and time travel.

how can a robot differentiate between positive or negative product reviews?

Answers

Answer:

Some of the sites have the rating system for example 3 stars, or the bot has a feature that can capture keywords that include a list of possible indicator that it is a negative review. For example if a user review includes a word "bad" or "horrible" the bot will flag that as a negative review.

Please give brainliest.

Research This: Which apps are available for your smartphone to erase data remotely? Which location-
tracking apps allow you to take a photo of the thief and then send an email message that contains the image
to you automatically? If your device is lost and you file a police report, you will need the device's serial
number. Locate that number now and write it on a piece of paper. Also, locate the phone's 15-digit
International Mobile Equipment Identity (IMEI) number and record that number. Store the document with
these two numbers in a secure location. In addition, research the efforts by the U.S. Federal
Communications Commission (FCC) and the Cellular Telecommunications Industry Association (CTIA) to
create a centralized database of lost and stolen mobile phones. What is the status of this database? What
legislation has been proposed or passed that requires wireless carriers and phone manufacturers to develop
technological solutions that can curb the growing problem of violent smartphone theft?

Answers

Answer:

OOP TY!

Explanation:

TY

You have a 7 GHz dual core processor. How many decisions can the processor

make in one second? *


PLEASE HELP 10 points

Answers

The unit that you're asking about (GHz) refers to the frequency.
Frequency is the reciprocal of time.
This means that it gives the measure of work done per unit time.
For example, suppose you can throw two apples in one second then the frequency of your throw is 2Hz or 2Hertz.

what is the most common type of storage device for transferring files from one computer to another?

Answers

Answer:

USB flash drives is the most common type of storage device for transferring files from one computer to another

why does messenger keep saying waiting for network

Answers

you prob need to fix your data or redownload it again

what level of system and network is required for cui

Answers

Answer:

CUI will be classified at a “moderate” confidentiality level and follow DoDI 8500.01 and 8510.01 in all DOD systems. Non-DoD systems must provide adequate security with requirements incorporated into all legal documents with non-DoD entities following DoDI 8582.01 guideline

Explanation:

____ is the state of not sharing information with or being observed by others.

Answers

Answer:

Privacy(guessed ,not really sure about it).

Other Questions
where did some people think tge civil war started in 1857 en nuestra ninez,mi amiga y yo ____ de nuestros cuentos favoritos -15a divided by 3 =? What are the approximate values of the missing side lengths in the triangle below?120 m404BC 136m, AB 89mBC 89m. AB 136m BC 105m, AB 162mBC 162m, AB 106m Pls help ASAP!!! Was John Adam against political parties? Was Thomas Jefferson against political parties? Which of these is a feature of audible pedestrian crosswalk signals?A. Emergency instructionsB. Responses to voice commandsC. Button location signalingD. Pedestrian tracking Please help!!!!Which set of side lengths forms a unique triangle ? A. 4 cm, 4 cm. 8 cm B.13 cm. 18 cm. 33 cm C. 7 cm. 14 cm, 20 cm D.106 cm, 215 cm, 323 cm In "Toxic Talk," the "Say What" section discussesA. chronic and acute poisoning.B. the languages scientists speak.C. the color of scientists' lab coats.D. the type of cell phone scientists use. De un depsito se gasta primero la mitad del agua, y luego la cuarta parte de lo que quedaba. Al final,quedan 12 litros. Hallar la capacidad del depsito. Decide if the following sentence is grammatically CORRECT or INCORRECT.Viele kranke Leute haben Bauchschmerzen gehabt.O correctO incorrect .Which set of angle measures CANNOT be the angle measures of a triangle?A= 60,60,61B=1,1,178C=13.9,16.1,160D,59,60,61 If a quadrilateral has these known angle degrees: 35, 35 and 145, what are the degrees of the fourth angle? how plants and animals get the matter they need to survive. Help fast 6th grade math PLEASE HELP ASAP REAL ANSWERS ONLY OR WILL BE DELETED! 20 PTS!! I just need someone to do this for verification of my work: What is the volume of the composite figure if both the height and the diameter of the cylinder are 2.5 feet? Give the exact answer and approximate to two decimal places. What defenses did Dachau have to prevent prisoners from escaping? If you were flipping a coin, and needed to get 2 heads in a row, what is the probability of getting two heads in a row. Use your probability tree to help. / Which statement best describes the association between variable X and variable Y?perfect negative associationmoderate positive associationno associationstrong negative association The hypotenuse of a certain triangle is 5 units long and one leg is 3 units long Did the area of the triangle Does Sam's story give you any idea for how two taster parents might have a child who is a non-taster Steam Workshop Downloader