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
Discuss All control statements supported by Go
elixir [45]

Answer:

The golang control flow statements are used to break the flow of execution by branching, looping, decision making statements by enabling the program to execute code based on the conditions. All programmers must know the control flows like if-else, switch case, for loop, break, continue, return.

Explanation:

4 0
3 years ago
The superclass Calculator contains: a protected double instance variable, accumulator, that contains the current value of the ca
yawa3891 [41]

Answer:

The following program are written in JAVA Programming Language.

//inherit the Calculator class

public class CalculatorWithMemory extends Calculator {  

   private double memory = 0.0;    //initialize double type variable

   public void save() {   //define function

       memory = accumulator;    

   }

   public void recall() {   //define function

       accumulator = memory;

   }

   public void clearMemory() {   //define function

       memory = 0;     //initialize the value

   }

   public double getMemory() {  

       return memory;    // return the value in "memory" variable

   }

}

Explanation:

Here, we inherit the property of the "Calculator" class.

Then, we define the private double type variable "memory" and assign value 0.0.

Then we set the function "save()" inside it we assign the value of "memory" in "accumulator" and close the function.

Then, we define the function "recall()" inside it we assign the value of "accumulator" in "memory" and close the function.

Then we set the function "clearMemory()" inside it we assign "memory" to 0.

After all, we set the double type function "getMemory()" inside we return the value of the "memory".

7 0
3 years ago
The chip that controls the radio frequency waves within a device
torisob [31]

Answer:

An RF module

Explanation:

I googled it lol

7 0
4 years ago
You want to store, organize, and manipulate your photos. what type of software do you need?
ohaa [14]

Answer:

You want to store, organize, and manipulate your photos. what type of software do you need?Adobe photoshop

sub heading:

what is photoshop?

Explanation:

1. you can dream it, you can make it with Adobe Photoshop.

2. Create beautiful images, graphics, paintings, and 3D artwork on your desktop or iPad

Reference link:

https://brainly.com

Hashtag:

#SPJ4

3 0
1 year ago
What type of network is the Internet? The Internet is an example of a_____network.
7nadin3 [17]

The Internet is an example of a WAN: Wide Area Network

5 0
3 years ago
Other questions:
  • What is the answer please
    13·2 answers
  • A ________ is hardware or software that acts as a filter to prevent unwanted packets from entering a network.
    9·2 answers
  • The ____ command displays the last 10 lines of a text file.
    5·1 answer
  • The number of bits per pixel is called what
    7·1 answer
  • Many people keep time using a 24 hour clock (11 is 11am and 23 is 11pm, 0 is midnight). If it is currently 13 and you set your a
    10·1 answer
  • Your friend is overspending and in need of a budget. What type of expense should they reduce next month?
    10·2 answers
  • Which statement pertaining to system reliability is FALSE? Select one: A. Having the latest version of software products can mak
    15·1 answer
  • . Each ____ on a menu performs a specific action.
    14·1 answer
  • In the 1880’s advancements in technology and processes made photography available to the general public. Who is considered the m
    12·1 answer
  • 2. What is the name for an action performed by the VR Robot?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!