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
marysya [2.9K]
3 years ago
5

Help me

Computers and Technology
1 answer:
denis23 [38]3 years ago
7 0

Answer:

a = 6, b = 0

Explanation:

The loop ran 3 times before b == 0. "while ((b != 0)" is essentially saying: 'While b is not equal to 0, do what's in my loop'. Same general thing with "&& ((a / b) >= 0)". The "&&" is specifying that there should be another loop condition, while the rest states: 'as long as a ÷ b is greater than 0, do what's in my loop'. If both of these conditions are met, the loop will run, It will continue this until the conditions are not met. Hope that helped! :)

You might be interested in
Define a function CoordTransform() that transforms the function's first two input parameters xVal and yVal into two output param
gogolik [260]

Answer:

Here is the function CoordTransform() that transforms the function's first two input parameters xVal and yVal into two output parameters xValNew and yValNew

void CoordTransform (int xVal ,int yVal ,int& xValNew, int& yValNew) { //function definition

xValNew = (xVal +1) *2; // adds 1 to old value (xVal) , multiplies the result by 2 and assigns that new value to xValNew

yValNew = (yVal +1) *2; } // adds 1 to old value (yVal) , multiplies the result by 2 and assigns that new value to yValNew

Explanation:

Here is the complete program:

#include <iostream> //to use input output functions

using namespace std; // to access objects like cin cout

void CoordTransform (int xVal ,int yVal ,int& xValNew, int& yValNew) { //function that takes four arguments

xValNew = (xVal +1) *2; // computes new value and assigns it to xValNew

yValNew = (yVal +1) *2;} // computes new value and assigns it to yValNew

int main() { // start of main function

//declares 4 int type variables xValNew, yValNew, xValUser, yValUser

int xValNew;

int yValNew;

int xValUser;

int yValUser;

cin >> xValUser; // takes value of xValUser from user

cin >> yValUser; // takes value of yValUser from user

CoordTransform(xValUser, yValUser, xValNew, yValNew); //function call

cout << "(" << xValUser << ", " << yValUser << ") becomes (" << xValNew << ", " << yValNew << ")" << endl; //prints the old and new values

return 0;}

In this program the function CoordTransform receives a reference to a variables  xValNew and yValNew so that it can modify the values of these variables. So  xValNew and  yValNew variables are declared as reference so they become an alternative name for the variables xValNew and  yValNew used in main() method . These variables are declared as reference in the function CoordTransform() by placing ‘&’ symbol in the declaration.

Suppose user enters 3 as value of xValUser and 4 as  value of yValUser

Now when the function  CoordTransform() is called it works as follows:

xValNew = (xVal +1) *2; this statement becomes:

xValNew = (3 + 1) * 2

xValNew = 4 * 2

xValNew = 8

Now this value is assigned to the xValNew of calling function (main) xValNew variable.

yValNew = (yVal +1) *2;

this statement becomes:

yValNew = (4 + 1) * 2

yValNew = 5 * 2

yValNew = 10

Now this value is assigned to the yValNew of calling function (main) yValNew variable.

So the output of the above program is:

(3, 4) becomes (8, 10)          

4 0
3 years ago
Doing free poitns soon!
podryga [215]
Yay i got free 5 points thanks
8 0
3 years ago
Read 2 more answers
5
vova2212 [387]

Answer:

Document

Explanation:

Document because after you structure your document together the way you like you can add pictures.

3 0
4 years ago
Read 2 more answers
When a pitcher is holding a baseball, the ball has ______energy.
MA_775_DIABLO [31]
Answer would be D)potential
3 0
3 years ago
Read 2 more answers
What is the Best decent priced Laptop/PC
luda_lava [24]

I'm on a brand new Lenovo and it was only like $500. Its great, especially if you are looking for a gaming Laptop. Otherwise, HP and Lenovo's older stuff is fairly decent in price

6 0
3 years ago
Other questions:
  • What are some situations where you might find it useful to use the “!” symbol in a program?
    9·1 answer
  • Data means a group of numbers. <br> a. True<br> b. False
    7·1 answer
  • Describe a new career in computer science that may be created in the future. Include supporting evidence in your response that s
    13·1 answer
  • The bearing of point p from A​
    15·1 answer
  • Within a table, the intersection of a row and a column creates a(n) ____.
    13·1 answer
  • Describe the three essential characteristics of an object fromthe perspective of object oriented paradigm.
    7·1 answer
  • ____ a British mathematician devolved the concept of a programmable digital computer and worked with Ada Lovelace to design the
    13·1 answer
  • Which of the following characterizes how an enabled security program might react to a new program installation on a computer sys
    7·2 answers
  • Jane wants to type a math assignment involving percentages she wants to insert the percent symbol after typing a number which ke
    10·1 answer
  • For quantitative data (e.g. the number of milligrams of a drug) coding your data involves?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!