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

Write a small program basic c++, that defines a negative integer (between ‐1 and ‐255), converts it to a positive value and then

displays it on the console window.
Computers and Technology
1 answer:
ANEK [815]3 years ago
4 0

Answer:

#include <iostream>

using namespace std;

int main() {

int a=-156;//negative integer between -1 and -255.

a*=-1;//multiplying a to -1 so that it can become positive.

cout<<a;//printing a.

return 0;

}

Explanation:

The above written program is in C++ and in the program an integer a is defined with a negative value in the program it is -156.Then to convert it to positive integer we have to multiply a to -1 after that printing the value of a on the screen.

You might be interested in
Suppose a program contains 500 million instructions to execute on a processor running on 2.2 GHz. Half of the instructions takes
Anit [1.1K]

Answer:

1.48 s

Explanation:

Number of instructions = 500 million = 500 * 10⁶

clock rate = 1 / 2.2 GHz = 1 / (2.2 * 10⁹ Hz) = 0.4545 * 10⁻⁹ s

We need to compute the clocks per instruction (CPI)

The CPI = summation of (value * frequency)

CPI = (50% * 3 clock cycles) + (50% * 10 clock cycles)

CPI = (0.5 * 3) + (0.5 * 10) = 1.5 + 5 = 6.5

Execution time = number of instructions * CPI * clock rate

Execution time = 500 * 10⁶ * 6.5 * 0.4545 * 10⁻⁹ =1.48 s

5 0
3 years ago
What would be the consequences if the Memory Manager and the
Ann [662]

Answer:

Result could be a memory leak or a spaceleak.

Explanation:

The result if a memory supervisor and a processor administrator quit conveying would prompt a negative result as they have to impart all together for the procedure manager to process the data that is being conveyed in and out.

3 0
3 years ago
Please help I really don't understand much about web technology.
ArbitrLikvidat [17]

Source : Wikipedia

I HOPE IT WILL HELP YOU.

6 0
3 years ago
You can use the ____ command to delete an entire table and its data.?
jek_recluse [69]
You can press control and x at the same time, the delete button, or backspace
6 0
4 years ago
People express more. often through the ___. language than written language
Oxana [17]
Verbal language because somebody's verbal words are more receptive then ones written word
5 0
4 years ago
Read 2 more answers
Other questions:
  • Charlotte has set up a home maintenance service that operates out of her city. Workers commit to being available for certain hou
    13·1 answer
  • The goal of conducting an incident analysis is to ascertain weakness. Because each incident is unique and might necessitate a di
    8·1 answer
  • How does a content management system differ from a basic wysiwyg web authoring tool??
    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
  • Assume that word is a variable of type string that has been assigned a value. Write an expression whose value is a string consis
    14·1 answer
  • Anybody know this question???
    6·1 answer
  • You want to use a computer to make a painting of your backyard to go along with a story you wrote. Which software would be appro
    8·1 answer
  • What is a graph,a chart then give similarities between graph and chart.​
    6·2 answers
  • Choose all items that are true about the two example of HTML shown on the right.
    5·2 answers
  • What feature is required to track customer search terms on a website?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!