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
Andrews [41]
3 years ago
5

What is the output of the following code?

Computers and Technology
1 answer:
Lynna [10]3 years ago
8 0

Answer:

The output is 24

Explanation:

Given

The above code segment

Required

The output

We have (on the first line):

x = 6

y = 3

z=24

result=0

On the second line:

result = 2*((z/(x-y))\%y+10)

Substitute the value of each variable

result = 2*((24/(6-3))\%3+10)

Solve the inner brackets

result = 2*((24/3)\%3+10)

result = 2*(8\%3+10)

8%3 implies that, the remainder when 8 is divided by 3.

The remainder is 2

So:

result = 2*(2+10)

result = 2*12

result = 24

<em>Hence, the output is 24</em>

You might be interested in
Which of the following criteria was a key milestone for the object-relational model created in the mid-1980s?
gladu [14]

The use of the inheritance to have a structure inherit attributes and methods of classes above it.


One of the key milestones in the period in which the object-relational model was created was the creation of a data
model that closely represented the real world. In this approach, objects were created in which both data and its
relationships were all contained in one place. These data models were becoming a norm to be stored on the web. They
also incorporated support for star schemas within data warehouses. Objects that had similar characteristics were
grouped into classes, where they had a shared structure of attributes and behaviors.

3 0
2 years ago
Which option will you use to expose your presentation to the audience?
Liula [17]
<span>Which option will you use to expose your presentation to the audience?
</span><span>B)Slide Show</span>
6 0
4 years ago
Read 2 more answers
Design a class called NumDays. The class’s purpose is to store a value that represents a number of work hours and convert it to
stepladder [879]

Answer:

See explaination

Explanation:

#include <iostream>

using namespace std;

class NumDays{

int hours;

float day;

public:

NumDays()

{

hours=0;

day=0.0;

};

NumDays(int h)

{

hours=h;

day=float(h/8.0);

};

int getHour()

{

return hours;

}

float getDay()

{

return day;

}

NumDays operator +(NumDays obj)

{

int h=getHour()+obj.getHour();

NumDays temp(h);

return temp;

}

NumDays operator -(NumDays obj)

{

int h=getHour()-obj.getHour();

NumDays temp(h);

return temp;

}

const NumDays& operator++() //prefix

{

++hours;

day=float(hours/8.0);

return *this;

}

const NumDays& operator--() //prefix

{

--hours;

day=float(hours/8.0);

return *this;

}

const NumDays operator++(int) //postfix

{

NumDays temp(*this);

++hours;

day=float(hours/8.0);

return temp;

}

const NumDays operator--(int) //postfix

{

NumDays temp(*this);

--hours;

day=float(hours/8.0);

return temp;

}

};

int main()

{

NumDays obj(2),obj2(10),obj3,obj4;

obj3=obj2-obj;

cout<<"'obj3=obj2-obj'=> Day:"<<obj3.getDay()<<"##Hour:"<<obj3.getHour()<<"\n";

obj3=obj+obj2;

cout<<"'obj3=obj+obj2'=> Day:"<<obj3.getDay()<<"##Hour:"<<obj3.getHour()<<"\n";

obj4=obj3++;

cout<<"'obj4=obj3++' => Day:"<<obj4.getDay()<<"##Hour:"<<obj4.getHour()<<"\n";

obj4=++obj3;

cout<<"'obj4=++obj3' => Day:"<<obj4.getDay()<<"##Hour:"<<obj4.getHour()<<"\n";

obj4=obj3--;

cout<<"'obj4=obj3--' => Day:"<<obj4.getDay()<<"##Hour:"<<obj4.getHour()<<"\n";

obj4=--obj3;

cout<<"'obj4=--obj3' => Day:"<<obj4.getDay()<<"##Hour:"<<obj4.getHour()<<"\n";

};

3 0
3 years ago
How does segmenting your network increase network security?
lys-0071 [83]

Answer:

By segmenting networks, it becomes easier to protect the most sensitive data that you have on your internally-facing network assets. The creation of a layer of separation between servers containing sensitive data and everything outside of your network can do wonders to reduce your risk of data loss or theft.

Explanation:

PLEASE MARK ME AS BRAINLIEST

5 0
3 years ago
Qn 1) Use only Python Programming language for the below question.
Readme [11.4K]

Using the knowledge of computational language in python we can write definitions of some functions that will be useful to organize the personal information of a person.

<h3>Writing this code in python we have:</h3>

<em>class Address:</em>

<em>      def __init__(self, street, num):</em>

<em>        self.street_name = street</em>

<em>        self.number = num</em>

<em>class CampusAddress(Address):</em>

<em>       def __init__(self,of_num,c_street="Hougang",c_num=77):</em>

<em>        self.office_number=of_num </em>

<em>        Address.__init__(self,c_street,c_num) </em>

<em>sally_addr = CampusAddress('8745 5951') </em>

<em>print(sally_addr.office_number)</em>

<em>print(sally_addr.street_name)</em>

<em>print(sally_addr.number)</em>

<em>print()</em>

<em>my_addr = CampusAddress('1111 1111','streaks',99)</em>

<em>print(my_addr.office_number)</em>

<em>print(my_addr.street_name)</em>

<em>print(my_addr.number)</em>

See more about python at brainly.com/question/23271145

#SPJ1

6 0
2 years ago
Other questions:
  • What are the latest technology in 2014
    11·1 answer
  • What is grid computing? It is distributed computing where autonomous computers perform independent tasks. It is interconnected c
    12·1 answer
  • The methodology used by web project teams is usually:
    9·1 answer
  • What is after gigabyte
    12·2 answers
  • Third party providers of publicly available data sets protect the anonymity of the individuals in the data set primarily by a. R
    6·1 answer
  • Which kind of blocks is used to hold values​
    7·1 answer
  • Sarah is having a hard time finding a template for her advertising business that she may be able to use at a later
    12·1 answer
  • Hamilton is the best
    12·1 answer
  • Write a new version (called map2) of the map function which operates on two lists. Your function should accept three parameters,
    15·1 answer
  • The television is the biggest technological advancement in communication since the telephone.
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!