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
Nesterboy [21]
3 years ago
10

Consider the following code:

Computers and Technology
1 answer:
jarptica [38.1K]3 years ago
3 0

Answer:

apple apple

banana

Explanation:

Given - Consider the following code:

x = "apple"

y = x

z = "banana"

To find - print(x + " " + y + "\n" + z)

It will print -

apple apple

banana

First will apple followed by '' '' that is space then y which is equal to x that is apple then followed by ''\n'' new line then banana.

So, The answer would be

apple apple

banana

Notation used -

'' '' represents space between two values

''\n'' represents new line

You might be interested in
Create a program that displays a menu to select addition, subtraction, or multiplication. Using random numbers between 0 and 12
Lemur [1.5K]

Answer:

This question is answered using C++

#include<iostream>

#include <cstdlib>

#include <ctime>

using namespace std;

int main(){

   int ope, yourresult;

   cout<<"Select Operator: \n"<<"1 for addition\n"<<"2 for subtraction\n"<<"3 for multiplication\n";

   cout<<"Operator: ";

   cin>>ope;

   srand((unsigned) time(0));

   int num1 = rand() % 12;

   int num2 = rand() % 12;

   int result = 1;

   if(ope == 1){

       cout<<num1<<" + "<<num2<<" = ";

       result = num1 + num2;

   }

   else if(ope == 2){

       cout<<num1<<" - "<<num2<<" = ";

       result = num1 - num2;

   }

   else if(ope == 3){

       cout<<num1<<" * "<<num2<<" = ";

       result = num1 * num2;

   }

   else{

       cout<<"Invalid Operator";

   }

   cin>>yourresult;

   if(yourresult == result){

       cout<<"Correct!";

   }

   else{

       cout<<"Incorrect!";

   }

   return 0;

}

Explanation:

This line declares operator (ope) and user result (yourresult) as integer

   int ope, yourresult;

This prints the menu

   cout<<"Select Operator: \n"<<"1 for addition\n"<<"2 for subtraction\n"<<"3 for multiplication\n";

This prompts the user for operator

   cout<<"Operator: ";

This gets user input for operator

   cin>>ope;

This lets the program generates different random numbers

   srand((unsigned) time(0));

This generates the first random number

   int num1 = rand() % 12;

This generates the second random number

   int num2 = rand() % 12;

This initializes result to 1

   int result = 1;

If the operator selected is 1 (i.e. addition), this prints an addition operation and calculates the actual result

<em>    if(ope == 1){</em>

<em>        cout<<num1<<" + "<<num2<<" = ";</em>

<em>        result = num1 + num2;</em>

<em>    }</em>

If the operator selected is 2 (i.e. subtraction), this prints an subtracttion operation and calculates the actual result

<em>    else if(ope == 2){</em>

<em>        cout<<num1<<" - "<<num2<<" = ";</em>

<em>        result = num1 - num2;</em>

<em>    }</em>

If the operator selected is 3 (i.e. multiplication), this prints an multiplication operation and calculates the actual result

<em>    else if(ope == 3){</em>

<em>        cout<<num1<<" * "<<num2<<" = ";</em>

<em>        result = num1 * num2;</em>

<em>    }</em>

If selected operator is not 1, 2 or 3, the program prints an invalid operator selector

<em>    else{</em>

<em>        cout<<"Invalid Operator";</em>

<em>    }</em>

This gets user input

   cin>>yourresult;

This checks if user result is correct and prints "Correct!"

   if(yourresult == result){

       cout<<"Correct!";

   }

If otherwise, the program prints "Incorrect!"

<em>    else{</em>

<em>        cout<<"Incorrect!";</em>

<em>    }</em>

   return 0;

6 0
3 years ago
To narrow the search for consumers, search engines used to measure the relevance of a website or an information page by counting
noname [10]
The answer is : it was easily manipulated.   To narrow the search for consumers, search engines used to measure the relevance of a website or an information page by counting the number of times the searched words appeared on that web page or document.  They don't use this criterion anymore because it was easily manipulated.
5 0
3 years ago
A flexible collection of computers on the internet begins to perform tasks traditionally performed on corporate computers. Major
maw [93]

Answer:

The correct answer to the following question will be "The cloud computing framework is emerging as an important innovation area of business".

Explanation:

  • Cloud computing allows the company or business to remotely manage their records, providing a broad means of accessing their data anywhere, all time.
  • Essentially, you borrow a cloud service provider's server space or connections to applications and links across the Web. Rather than purchasing your own IT equipment, you rent from a provider and only charge for the services you need.
  • The guide helps you appreciate computing, as well as the different methods of cloud hosting, which can be used in your organization.

Therefore, it's the right answer.

8 0
4 years ago
Civil engineering structures are also called _________.
spayn [35]

Answer:

Hey mate here is your answer

Civil engineering structures

Civil structural engineering includes all structural engineering related to the built environment. It includes: Bridges. Dams.

So, Civil Structural engineering

please mark me as a brainliest

4 0
2 years ago
A legend in Excel is __________.
KIM [24]

Answer:

an information key that explains how information in a chart is represented by colors or patterns

Explanation:

This is the information that is used to explain the data in the graph.

4 0
4 years ago
Read 2 more answers
Other questions:
  • Frank works for an organization that wishes to install a software program on a single server with multiple users connected. Whic
    8·1 answer
  • Why would Google combining information from separate accounts across its services and sites have privacy implications for its us
    11·1 answer
  • Beth accidentally clicked Send on a message that was addressed to multiple recipients. She wants to use the recall option. Which
    15·1 answer
  • Stuart wants to delete some text from a slide. What should Stuart do?
    8·1 answer
  • A company has three (3) components in a system and requires all three to be operational for 24 hours, Monday to Friday. Failure
    5·1 answer
  • Aarti, a museum employee, has created a table in access titled “Roman Achitecture”. She has included a field that links users im
    8·1 answer
  • You receive an email from a woman claiming her father was poisoned by business associates, but before his passing placed 12 mill
    12·2 answers
  • Wyjaśnij w jaki sposób wykonuje się nitowanie zakładkowe i nakładkowe, oraz wyjaśnij na czym polega pasowanie mieszane.
    7·1 answer
  • Forgot this website exsited wsp
    10·2 answers
  • What was the name of the first computer, developed by charles babbage?.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!