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
Illusion [34]
3 years ago
12

Define some everyday if else statements you use to determine action. What are the branches of your statement?

Computers and Technology
1 answer:
Nat2105 [25]3 years ago
7 0

Explanation:

if(more than three hours left)

{

    study web-development;

}

else

{

   practice coding;

}

I have taken an real life example and present it as if-else statements.

If I have more than 3 hours free in a day.Then I should study web-development.

If i don't have more than 3 hours free in a day then I should practice coding.

Branches are the statements within the {} curly braces.In our case these are:-

study web-development;

practice coding;

You might be interested in
The major objective of this lab is to practice class and object-oriented programming (OOP), and separate files: 1. We will reuse
vovangra [49]

Answer:

Implementation of resistor.cpp

#include "resistor.h"

Ohms::Ohm()

{

// default constructor

voltage=0;

}

Ohms::Ohm( double x) // parameterised constructor

{

voltage = x; // voltage x set to the supply voltage in the private data field called voltage

}

Ohms:: setVoltage(double a)

{

voltage = a;// to set supply voltage in private data field called voltage

}

Ohms::setOneResistance( String s, double p)

{

cin>>p; //enter the resistance value

if(p<=0) // if resistance is less than or equals to 0

return false

else // if re

cin.getline(s);

}

Ohms::getVoltage()

{

return voltage; //return voltage of ckt

}

Ohms::getCurrent()

{

return current; //return current of ckt

}

Ohms:: getNode()

{

return resistors; //return resistors of ckt

}

Ohms::sumResist()

{

double tot_resist = accumulate(resistors.begin(),resistors.end(),0); //std::accumulate function for calculating sum //of vectors and following are the starting and ending points

return tot_resist;

}

Ohms::calcCurrent()

{

if(current <=0) // if current is less than or equal to 0

return false;

else   // if current is greater than 0

return true;

}

Ohms:: calcVoltageAcross()

{

if(voltage<=0) // if voltage is less than or equal to 0

return false;

else //if voltage greater than 0

return true;

}

Explanation:

in the case of main.cpp its simple just make a class object and remember to include resistors.cpp with it for which the second last picture describes the process precisely. (Hint: Use theunit test case functions in the main.cpp).

As you can see node is a structure consisting of member variables, followed by a class Ohms representing a DC circuit.

By looking at these pictures, it is needed to implement the main.cpp and resistor.cpp files. The user defined header file resistor.h already consists of all contents of Class Ohm, struct node. You don't need to modify it in anyway in such case.

8 0
3 years ago
What’s your fave tv show?
kompoz [17]

Answer:

the vampire diareas

Explanation:

7 0
3 years ago
Read 2 more answers
Which emails go to the draft folder
castortr0y [4]

Answer:

Hi there, the only emails that go to the draft folder are the emails that you start to write and then you don't finish it so you can go back and finish writing it later.

Explanation:

<h2>Hope this helps!! Please consider marking brainliest! Have a good one!!</h2>
6 0
3 years ago
Read 2 more answers
Does anybody know how to unlock websites from school computer
Grace [21]

Answer:

yes go to settings then apps

Explanation:

that's how I did mines

8 0
3 years ago
Distinguish between engineering and architecture​
Liula [17]

difference between engineering and architecture are.

A engineer is a person whose job involves designing and building engines, machines, roads, bridges ,etc .

While architect design buildings only.

3 0
3 years ago
Other questions:
  • Abigail is interested in connecting her tablet that usually connects to a wireless network, to her personal computer that usuall
    11·2 answers
  • Mrs. Golden wanted to collect baseline data on how often Lauren speaks to her neighbors during silent reading. He divided the 15
    9·1 answer
  • Which of these is not a modifier?<br><br> short<br><br> unsigned<br><br> nest<br><br> long
    15·1 answer
  • The ability to learn a new computer software program is to ____________ as knowledge of state capitals is to _____________.
    11·1 answer
  • ​A(n) ________ database makes it possible to store information across millions of machines in hundreds of data centers around th
    14·1 answer
  • Controlled intersections use some form of which of the following:
    7·1 answer
  • What is ucspi-tcp pakage in qmail??
    5·1 answer
  • Word processing, presentation, photo editing, and video games are all types of what?
    9·2 answers
  • Which key you should you press to leave the cell as it orginally was
    14·2 answers
  • If a password is entered wrongly three times the computer will
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!