answer.
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
Slav-nsk [51]
2 years ago
12

1.2.2: Output variable value. Jump to level 1 Write a statement that outputs variable userAge. End with a newline. 1 2 3 4 5 6 7

8 9 10 11 12 #include using namespace std; int main() { int userAge; cin >> userAge; // Program will be tested with values: 15, 40. /* Your code goes here */ return 0; } 1 2 Check Next 1 2
Computers and Technology
1 answer:
serg [7]2 years ago
5 0

Answer:

cout<<"User Age is ="<<userAge<<endl;

Explanation:

#include<iostream>

using namespace std;

int main()

{

int userAge;

cin >> userAge; // Program will be tested with values: 15, 40.

cout<<"User Age is ="<<userAge<<endl;

return 0;

}

You might be interested in
Write a code segment that uses an enhanced for loop to print all elements of words that end with "ing". As an example, if words
nadezda [96]

Answer:

 public static void main(String[] args) {

   String ing[] = {"ten","fading","post","card","thunder","hinge","trailing","batting"};

   for (String i: ing){

     if (i.endsWith("ing")){

       System.out.println(i);

    }

   }

 }

Explanation:

The for-loop cycles through the entire list and the if-statement makes it so that the string is only printed if it ends with "ing"

6 0
2 years ago
Write a copy assignment operator for CarCounter that assigns objToCopy.carCount to the new objects's carCount, then returns *thi
ollegr [7]

Answer:

Here is the copy assignment operator for CarCounter:

CarCounter& CarCounter::operator=(const CarCounter& objToCopy) {

carCount = objToCopy.carCount;

return *this;  }

The syntax for copy assignment operator is:

ClassName& ClassName :: operator= ( ClassName& object_name)

In the above chunk of code class name Is CarCounter and object name is objToCopy.

Assignment operator = is called which assigns objToCopy.carCount to the new objects's carCount.

This operator basically is called when an object which is already initialized is assigned a new value from another current object.

Then return *this returns the reference to the calling object

Explanation:

The complete program is:

#include <iostream>  //to use input output functions

using namespace std;   //to access objects like cin cout

class CarCounter {  //class name

public:  // public member functions of class CarCounter

CarCounter();  //constructor of CarCounter

CarCounter& operator=(const CarCounter& objToCopy);  //copy assignment operator for CarCounter

void SetCarCount(const int setVal) {  //mutator method to set the car count value

carCount = setVal;  } //set carCount so setVal

int GetCarCount() const {  //accessor method to get carCount

return carCount;  }  

private:  //private data member of class

int carCount;  };    // private data field of CarCounter

CarCounter::CarCounter() {  //constructor

carCount = 0;  //intializes the value of carCount in constructor

return; }  

// FIXME write copy assignment operator  

CarCounter& CarCounter::operator=(const CarCounter& objToCopy){

/* copy assignment operator for CarCounter that assigns objToCopy.carCount to the new objects's carCount, then returns *this */

carCount = objToCopy.carCount;

return *this;}  

int main() {  //start of main() function

CarCounter frontParkingLot;  // creates CarCounter object

CarCounter backParkingLot;   // creates CarCounter object

frontParkingLot.SetCarCount(12);  // calls SetCarCount method using object frontParkingLot to set the value of carCount to 12

backParkingLot = frontParkingLot;  //assigns value of frontParkingLot to backParkingLot

cout << "Cars counted: " << backParkingLot.GetCarCount();  //calls accessor GetCarCount method to get the value of carCount and display it in output

return 0;  }

The output of this program is:

Cars counted = 12

3 0
2 years ago
Calvin is an aspiring graphic designer. He wants to achieve Adobe Certified Expert certification in software that will be helpfu
bazaltina [42]

Answer:

a

Explanation:

9 0
2 years ago
Widget Corp. wants to shift its list of inventory to a cloud so that its different branches can access it easily. The company ne
____ [38]

Answer:

The best cloud option for Widget Corp considering the cloud computing option should be cost-effective and should not expose mission-critical applications and data to the outside world.

Is a hybrid could.

Explanation:

The reasons behind this answer are that in the first place the cloud is not going to be fully managed by a third party, but also by the IT department of Widget Corp allowing it to control its security. Also, that the cloud can be adapted to public or mainstream sources, resources, and platforms. Making it very user friendly and lowering down specific knowledge to use it.

5 0
2 years ago
To finish creating a design for the webpage, use one shape to cut away part of the other. Create a 700 pixel by 700 pixel square
Flauer [41]

Answer:

Explanation:

1. select the rectangle 1 layer and then select the rectangle tool in the left tool bar

2. in the option bar along the top of the UI, select the path operations drop-down and choose subtract front shape.

3. click anywhere on the thin, white rectangle shape on the left side of the document

4. in the create rectangle dialog box, type 700 px for the height and 700 px for the width.

5. click the checkbox that says from center to ensdure the new shape is created from the center of the rectangle 6. click ok

6 0
2 years ago
Other questions:
  • Michael has increased the contrast of the given picture. Which feature or menu option of a word processing program did he use?
    14·2 answers
  • c++ You are given an array A representing heights of students. All the students are asked to stand in rows. The students arrive
    5·1 answer
  • A _________________________ can use SOAP headers to carry meta information in its messages. A. Web service B. REST Service C. Co
    14·1 answer
  • For any element in keysList with a value greater than 60, print the corresponding value in itemsList, followed by a semicolon (n
    14·2 answers
  • A form of artificial intelligence that can perform many complex, _______ tasks. Select one: a. serialized b. repetitive c. non-r
    7·1 answer
  • Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the a
    9·1 answer
  • Explain the emerging trends in microcomputer technology in relation to size​
    11·1 answer
  • Accenture has partnered with a global construction company that specializes in building skyscrapers. The company wants better ma
    12·1 answer
  • Doug grew up on a large farm in southwest Wisconsin. As a college graduation gift, Doug’s father gave him several hundred acres
    6·1 answer
  • A data scientist is writing a Machine Learning (ML) algorithm using a large data set.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!