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
svetlana [45]
3 years ago
11

Assume that the following variables have been defined in a program: int x = 10; int y = 20; int z = 30; Write a cout statement t

hat displays the sum of the variables x, y, and z.
Computers and Technology
1 answer:
Drupady [299]3 years ago
7 0

Answer:

The program to this question as follows:

Program:

#include <iostream> //defining header file

using namespace std;

int main() //defining main method

{

int x = 10,y = 20,z = 30; //defining integer variable and assigning the value

int sum;//defining integer variable sum  

sum =x+y+z;//adding value,that holds by sum variable  

cout<<"sum: "<<sum; //print value

return 0;

}

Output:

sum: 60

Explanation:

Description of the above code as follows:

  • In the above code three integer variable "x, y, and z" is declared, that initialized with the value, that is 10, 20, and 30.
  • In the next line, another variable "sum" is declared, that holds the above variable value and add the number.
  • Then the print function "cout"  is used, which prints sum variable value.
You might be interested in
The Office ____ is a temporary storage area. Warehouse Clipboard Storehouse Gallery
yanalaym [24]
The answer is The Office Clipboard.

In most Microsoft Windows, Office Clipboard is used as a temporary storage for some software applications such as Microsoft Office Applications. It allows you to store up to 24 items either texts or graphics. For example, when you copy a text from one location this text will be temporarily stored in the clipboard until you paste them to another location.
4 0
3 years ago
"what is the problem with using challenge handshake authentication protocol (chap) as an authentication protocol?"
Alexxandr [17]

Its use of the message digest 5 (MD5) hash algorithm for security.

CHAP uses a combination of MD5 hashing and a challenge-response mechanism, and authenticates without sending passwords as plaintext over the network. The security of the MD5 hash function is severely compromised.

5 0
3 years ago
The ArrayList class contains a trim method that resizes the internal array to exactly the capacity. The trim method is intended
andreev551 [17]

Answer:

public void trimToSize() {

modCount++;

if (size < elementData.length) {

elementData = (size == 0)

? EMPTY_ELEMENTDATA

: Arrays.copyOf(elementData, size);

}

}

Now, the running time for copyOf() function is O(N) where N is the size/capacity of the ArrayList. Hence, the time complexity of trimToSize() function is O(N).

Hence, the running time of building an N-item ArrayList is O(N^2).

Please find the sample code below.

CODE

==================

import java.util.ArrayList;

public class Driver {

  public static void main(String[] args) throws Exception{

      int N = 100000;

      ArrayList<Integer> arr = new ArrayList<>(N);

     

      long startTime = System.currentTimeMillis();

      for(int i=0; i<N; i++) {

          arr.add(i);

          arr.trimToSize();

      }

      long endTime = System.currentTimeMillis();

      double time = (endTime - startTime)/1000;

      System.out.println("Total time taken = " + time + " seconds.");

  }

}

Explanation:

5 0
3 years ago
Select the correct answer.
DochEvi [55]

Answer:

ask customers to use strong passwords to protect their accounts

6 0
3 years ago
Read 2 more answers
List some of the CSS and HTML code that is confusing to you. List at least three CSS attributes and three HTML tags.
svet-max [94.6K]

Answer:

HTML Tags: <input/>, <canvas></canvas>, <div></div>

CSS Attributes: padding, font-family, margin

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • How many homes can be warmed by one bugatti
    11·2 answers
  • What type of firestopping technology expands as much as 25 times in volume?
    6·1 answer
  • Manuel is working on a project in Visual Studio. He wants to keep this program showing on the entire desktop, but he also needs
    7·1 answer
  • A security system uses sensors at every door and window which will set off an alarm if any one of them is opened. There is also
    13·1 answer
  • Write a program that reads in text from standard input (hint: use Scanner) and prints out the number of words in the text. For t
    5·1 answer
  • Truncation is a keyword search technique that helps you find useful variations of a term or terms. You want to find books on the
    5·1 answer
  • Jeremy is typing a term paper on his computer and saves it every five minutes or so for good measure. which of the following bes
    11·1 answer
  • What is the leading use of computers
    15·2 answers
  • Management of software development consist of?
    15·1 answer
  • When an EC2 instance is being modified to have more RAM, is this considered Scaling Up or Scaling Out?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!