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
svlad2 [7]
3 years ago
15

Write an expression that computes the integer average of the int variables exam1 and exam2 (both declared and assigned values).

Computers and Technology
1 answer:
Minchanka [31]3 years ago
7 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   int exam1 = 70;

   int exam2 = 85;

   int examAverage;

   examAverage = (exam1+exam2)/2;

   cout <<"The Average of Exam1 and Exam2 is: "<<examAverage<<endl;

   return 0;

}

Explanation:

Using the C++, we declare the three variables all of type

exam1

exam2 and

examAverage

We assign initial values of 70 and 85 to exam1 and exam2 respectively

You might be interested in
Examples of hardware that computes on a network can share are the operating system and the web browsers
qwelly [4]

Answer:

False.

Explanation:

The hardware component of a computer can be defined as the physical parts or peripherals that enables it to work properly. Some examples of hardware components are monitor, speaker, central processing unit, motherboard, hard-drive, joystick, mouse, keyboard, etc.

A software component of a computer comprises of software application or program that are used by the computer to manage or control software application, computer hardware and user processes. Some examples of software components are operating system, registry keys, antivirus, media player, word processor, etc.

In conclusion, the hardware components of a computer are the physical parts that can be seen and touched while the software components cannot be touched but rather are installed as a program.

Hence, examples of software but not hardware that computers on a network can share are the operating system and the web browsers

4 0
3 years ago
PLEASE HELPPPPPPP What should you always disconnect before installing hardware inside a computer’s case?
Ad libitum [116K]

Answer:

a) all cabling hope it helps

3 0
3 years ago
In a C++ program, one and two are double variables and input values are 10.5 and 30.6. After statement cin &gt;&gt; one &gt;&gt;
melisa1 [442]

Answer:

The answer is "Option d"

Explanation:

In the given C++ program code, It is defined, that two double type variable "one and two" is defined, that holds the two double value that is "10.5 and 30.6".

In this code, it uses the "cin" method for input values from the user ends, when we execute this code, it provides the console screen, that inputs the double type value from the user side, and other given choices were wrong because it holds different values.

3 0
4 years ago
When a project is saved, the new file name appears on the ____ tab?
BartSMP [9]
It appears on Document window tab
7 0
3 years ago
Use Quicksort algorithm to sort the following list of random numbers. Show all steps. Derive the time complexity of Quicksort an
Zigmanuir [339]

Answer:

Quick Sort is a Divide and Conquer algorithm which picks an element as a pivot which divide the array into two halves.

Sorted Array -2 | 0 | 1| 3| 4| 5 | 6| 7 | 8| 9 |10 | 12 |14| now array is sorted

Time Complexity of Quick Sort = = O ( n log n )

asymptotic notation using master theorem = T(n) = aT (n/b) + θ ( n^k log^p n)

Explanation:

Quick Sort is a Divide and Conquer algorithm which picks an element as a pivot which divide the array into two halves. There are many types of Quick Sort as

  •  Pick the first element as pivot
  • pick the last element
  • pick random element
  • pick median element

3 | 4 | -2 | 8 | 10 | 5 | 0 | 7 | 12 | 14 | 9 | 6 | 8 |1 | 5 //5 as a pivot

-2 | 3 | 4| 8| 5| 0| 7 |10 |12| 14 | 9 | 6 | 1| 5| 8 //8 as pivot

-2 | 0 | 1| 3| 4| 5 | 6| 7 | 8| 9 |10 | 12 |14| now array is sorted

here pick a point as initial values first pick 5 as pivot then compare the 5<values if it id true then swap it of it is false move towards next and check the condition. Similarly half array is sorted pick 8 as pivot point then do the same procedure and sort the other half array.

Time Complexity of Quick Sort

T(n) =a

= 2T(n/2) + n

= 2( 2T (n/4) + n/2) + n

= 2² T (n/2²) +n +n

= 2² (2t(n/2³)+n/4 ) +n +n

= 2³T (n/2³) + n +n +n

= 2^k T ( n/ 2^k) + nk

= nT( n/n ) + n log n

= na + n log n

= O ( n log n )

asymptotic notation using master theorem.

T(n) = aT (n/b) + θ ( n^k log^p n)

a = number in the recursion and a >= 1

n/b = size of each sub problem

b > 1, k >= 0 and p is a real number.

6 0
3 years ago
Other questions:
  • Write a class named Averager containing: An instance variable named sum of type integer, initialized to 0. An instance variable
    6·1 answer
  • How do you create a logo on Adobe illustrator
    8·1 answer
  • Adam has to write a paper where the margins need to be set to these measurements: Left: 1.5" Right: 4" Bottom: 1" Top: 1"
    15·1 answer
  • Students working at individual PCs in a computer laboratory send their files to be printed by a server that spools the files on
    13·1 answer
  • The Work Queue "Customer Onboarding" has a number of Pending Items which may be tagged as
    9·1 answer
  • 20. A computer freezes at odd times. At first, you suspected the power supply or overheating, but you have eliminated overheatin
    6·1 answer
  • What is the exposition of the movie inside out
    13·2 answers
  • Write a C function which takes three parameters which are the cost for an item in a grocery store, the quantity to buy, and the
    12·2 answers
  • What does coding mean​
    10·2 answers
  • Assume x represents an integer number, what is the highest index value in the following array? byte[] values = new byte[x]; Grou
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!