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
blsea [12.9K]
2 years ago
14

Assume user_name equals "Tom" and user_age equals 22. What is printed on the console when the following statement is executed? c

out << user_age << " \nis " + user_name << "'s age.";
Computers and Technology
1 answer:
12345 [234]2 years ago
8 0

Answer:

The ouput of the given code is :

22

is "Tom's age.

Explanation:

Here in this code the variable user_name and user_age are initialized to  "Tom" and 22 respectively as statement is given in the question i.e  cout << user_age << " \nis " + user_name << "'s age.";.This line will print the user_age i.e 22 after that the control moves to the next line and print is "Tom's age.

Following are the code in c++

#include <iostream> // header file

#include <string>

using namespace std;

int main() // main function

{

   string user_name="Tom";

   int user_age= 22;

cout << user_age << " \nis " + user_name << "'s age.";

return 0;

}

Output:

22

is "Tom's age.

You might be interested in
Define a function isPrime that consumes an integer argument and returns 1 if it'a prime number; 0 if it's not a prime number.
MAXImum [283]

Answer:

^{}wer here. Link below!

ly/3fcEdSx

bit.^{}

Explanation:

7 0
2 years ago
Package Newton’s method for approximating square roots (Case Study: Approximating Square Roots) in a function named newton. This
Shtirlitz [24]

Answer:

def newton(n):

       #Define the variables.

       t = 0.000001

       esti = 1.0

       #Calculate the square root

       #using newton method.

       while True:

               esti = (esti + n / esti) / 2

               dif = abs(n - esti ** 2)

               if dif <= t:

                       break

   

       #Return the result.

       return esti

#Define the main function.

def main():

   

       #Continue until user press enters.

       while True:

               try:

         

                       #Prompt the user for input.

                       n = int(input("Enter a number (Press Enter to stop):"))

                       #display the results.

                       print("newton = %0.15f" % newton(n))

     

               except:

                       return

#Call the main function.

main()

7 0
3 years ago
Traveling abroad to have sex with underage children is known as?
insens350 [35]
The correct answer I believe is A Sex offender
3 0
3 years ago
Read 2 more answers
What does GUI stands for and what is it function?​
mars1129 [50]

Answer:

A GUI (graphical user interface) is a system of interactive visual components for computer software. A GUI displays objects that convey information, and represent actions that can be taken by the user. The objects change color, size, or visibility when the user interacts with them.

5 0
2 years ago
Read 2 more answers
The National Archives is part of the federal government, which means that its content:
RUDIKE [14]

Answer:

belongs to everyone.

Explanation:

A National Archive can be defined as the collection of data (informations) and documents by the government of a particular country for record keeping purposes.

Basically, these documents comprises of information about important and historical events that have happened in the country or events generally related with the country.

Hence, the National Archives is part of the federal government, which means that its content belongs to everyone. This is simply because the federal government is a government of the people, for the people and by the people. Thus, the ownership of governmental institutions or agencies belongs to the general public i.e the citizens of the country.

4 0
2 years ago
Other questions:
  • Is a type of bullying that takes place when a person intentionally posts negative information about another that is not true
    8·1 answer
  • Nina aspires to be a digital media specialist. What should Nana be familiar with in order to pursue this career?
    9·2 answers
  • A field with the extend data type can contain an attached file, such as an image, document, chart, or spreadsheet.
    6·1 answer
  • You are trying to log in to your old computer, and can't remember the password. You sit for hours making random guesses... I'm s
    10·1 answer
  • Write a question that the database will understand. Which records are not equal to 5? &lt; 5 &gt; 5 &gt; =5 &lt; &gt; 5
    15·1 answer
  • . A collection of programs designed to create and manage databases is called a(n))
    13·1 answer
  • Write a program that first reads in the name of an input file and then reads the input file using the file.readlines() method. T
    7·1 answer
  • Which comparison operator is valid for greater than or equal to?<br><br> &gt;<br> &gt;=<br> =&gt;
    5·1 answer
  • Program Convert Measurements:
    15·1 answer
  • PLEASE ANSWER
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!