Answer:
B. If it is raining, bring an umbrella regardless.
Explanation:
Here is the code syntax:
<em>while </em>_ = <em>true</em>
<em> print</em>(rain)
In short words, this syntax is basically saying while a condition is true, do this. "This", is the function run under the true condition. For while loops to work, at least one condition of anything must be true.
- Hope this helps!
- If that's the case, please give thanks!
Answer:
The following are the code in the C++ Programming Language.
//define header file
#include <iostream>
// using namespace
using namespace std;
//define a class
class Accumulator
{
//set private access modifier
private:
//declare integer type variable
int sum;
//set public access modifier
public:
//define constructor
Accumulator (int sum)
{
//refer the same class as instance variable
this->sum = sum;
}
//define integer type function
int getSum()
{
//return the value of sum
return sum;
}
//define void type function
void add (int value)
{
//variable sum is increased by the argument value
sum += value;
}
};
Explanation:
<u>The following are the description of the code</u>.
- Firstly, set the required header file and namespace then, define a class 'Accumulator' and inside the class.
- Set private access modifier then, declare an integer data type variable 'sum'.
- Declare a class constructor whose name is the same as the class name 'Accumulator()' and pass integer data type argument 'sum' in its parameter that refers to the same class as instance variable.
- Define a integer data type function 'getSum()' that return the value of the variable sum.
- Finally, define a void type function 'add()' and pass the integer data type argument 'value' in its parameter in which the variable sum is increased by the argument value
.
Answer:
impossible
Explanation: sorry but too bad
Answer:
16pi or 50.24
Explanation:
The area of a circle is pi(r)^2, and since r = 4, then the area is pi * 4^2 which is 16pi.