<span>#include <iostream>
using namespace std;
bool bears(int n);
int main(){
int number;
do{
cout<<"enter the amount of bears (press 0 to stop the program): ";
cin>>number;
if (bears(number)){
cout<<"you have reached the goal!"<<endl;
}
else{
cout<<"sorry, you have not reached the goal."<<endl;
}
}while(number != 0);
}
bool bears(int n){
if (n < 42){
return false;
}
else if (n == 42){
return true;
}
else{
if (n % 5 == 0){
return bears(n - 42);
}
else if(n % 2 == 0){
return bears(n / 2);
}
else if(n % 4 == 0|| n % 3 == 0)
{
int one;
int two;
one=n%10;
two=(n%100)/10;
return bears(n - one * two);
}
}
<span>}</span></span>
Answer: D. Public domain
Explanation:
Hi, the term Public domain is applied to works of authorship that are ineligible for protection by copyright laws, because the copyright has expired or it was never copyrighted in the first place.
Public domain may vary in different countries and jurisdictions, for example; a media piece may be protected by copyright in one specific country, and be public domain in other countries.
Feel free to ask for more if needed or if you did not understand something.
Answer:
a) printf("%-5.3e",x);
b) printf("%10llu",x);
<h3>
Explanation:</h3>
We can assign any value to x at the start of program:
For Example:
float x = 72.149;
Then in order to print exponential notation, left justified, in field size of 5 with 3 digits after the decimal point, we need to use the following format:
printf("%-5.3e",x);
where e represent exponential notation.
5 represents field size of 5 and 3 represents digits after decimal point.
In order to print x as right justified, in a 11 digit field, we need to use the following format:
printf("%10llu",x);
Answer:
LAN
Explanation:
Local Area Network infrastructure provides access to users and end devices in a small geographical area, which is typically a network in a department in an enterprise, a home, or small business.
Answer:
There are three types of the computer on the basis of work. They are analog, digital, and hybrid computer. The computer that work with natural phenomena and physical values like earthquake measurement, speed of the wind, weight light etc is known as Analog computers.
Explanation: