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
melomori [17]
3 years ago
6

Given two numbers X and Y. Write a pseudo code to determine the difference between X and Y. If X-Y is negative, compute R=X+Y; i

f X-Y is zero, compute R=2X+2Y; and if X-Y is positive, compute R=X*Y. Print out the values of X, Y and R
Computers and Technology
1 answer:
Dmitry_Shevchenko [17]3 years ago
4 0

Program approach:-

  • Using the necessary header file.
  • Using the standard I/O namespace.
  • Define the main function.
  • Display the x and y values.
  • Return the value.

Program:-

//header file

#include <iostream>

//using namespace

using namespace std;

//main function

int main() {

   int X, Y, R;

   //display the x and y values

   cout<< "Enter X and Y values: ";

   cin>>X>>Y;

   

   if (X - Y > 0)

   {

       R = X*Y;

   }

   else if (X -Y < 0)

   {

       R = X + Y;

   }

   else

   {

       R = 2*(X+Y);

   }

   cout << "Value X = "<<X<<endl;

   cout << "Value Y = "<<Y<<endl;

   cout<< "Result R = "<<R<<endl;

   //return the value

   return 0;

}

Learn more value of X, Y, and R.

brainly.com/question/14293267

You might be interested in
A machine called a centrifuge is used in _____.
Alenkasestr [34]
A machine called a centrifuge is used in many technologies and branches of science, it uses rotary motion to separate material held in suspension from the medium it is suspended in.
7 0
3 years ago
When declaring the data type for a multidimensional array of strings, which statement would be most appropriate?
romanna [79]

Answer:

This question required option (See Explanation)

Explanation:

Required

How to declare 2D array

Using Java as a programming language of reference, the syntax to declare a 2D array is:

Data-Type [][] Array-Name = new Data-Type[Rows][Column]

From the question, the data type is String. So, the syntax becomes

String [][] Array-Name = new String[Rows][Column]

Assume the array name is: myArray; The above becomes

String [][] myArray= new String[Rows][Column]

<em>I will not assume values for Rows and Column, but it is worth saying that Rows and Columns are positive integers greater than 1 to make the array a 2 D array</em>

4 0
3 years ago
kelly wants to buy a new operating system for a laptop. under which category will it be in online store?
GuDViN [60]

Answer:

Kelly should look at the electronics section, where the laptops are because a laptop is an electronic. Just like an iPhone, iPad, and a TV.

7 0
4 years ago
Which commands are on the right-most side of the Title bar? (From Microsoft Word)
jeyben [28]
<h2>Answer:</h2>

Title bar is the top most bar of a window. As obvious from the name, it has the title of the program in use. It has name of the program or more specifically the name of currently open document is written in this horizontal bar.

The option/commands present in the right most o the title bar are as follows:

  • Close
  • Maximize/Resize
  • Minimize

Close command is needed to exit the program/application. A cross icon is used as close command. Maximize/Resize command helps to expand the window to the screen pane as well as allows the user to adjust the screen of application accordingly. Two squares icon is used as a button for this command. Minimize command helps by shutting the app to the task bar so that it can be expanded/maximized later. A dash/line icon is used as a button for this command.

<h2>I hope it will help you!</h2>

6 0
3 years ago
Which group allows you to add notes to your presentation?
aleksandrvk [35]

Answer:

Presentation views

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • One disadvantage of using the styles feature of a word processor is that you cannot modify existing styles. true or false
    14·1 answer
  • The email application used by Jim’s office is sending emails with viruses attached to them to user’s computers. What step should
    13·2 answers
  • Terry is building a Web site and wants to have three main links called Home, Product Info, and Contact Us. She will create a hie
    9·1 answer
  • Which of the following companies develop, own, and provide travel products for people?
    8·1 answer
  • What feature, new to Windows Server 2012, provides the ability to find identical sets of data on a SAN-based storage array and r
    13·1 answer
  • What do the power key and refresh key do when pressed together
    11·1 answer
  • He is the person behind the development of electronic mail
    13·1 answer
  • ## Inputs
    15·1 answer
  • Why are women more exposed to mass media?
    9·2 answers
  • A(n) _____ is the software that enables the os to control a device.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!