Answer:
<h2>A bug in a computer is refered to as a "computer virus" its where certain things on the computer or apps on it aren't working like they were designed to. </h2>
Explanation:
<h2>Hope this helps:)!</h2>
Answer:
#include <iostream>
#include <string>
#include <regex>
using namespace std;
int main()
{
cout << "Enter a 5-digit number: ";
string number;
cin >> number;
bool valid = regex_search(number, regex("^\\d{4}[02468]$"));
if (valid) {
valid = stoi(number.substr(0, 1)) + stoi(number.substr(1, 1))
< stoi(number.substr(3, 1)) + stoi(number.substr(4, 1));
}
cout << number << (valid ? " is valid" : " is invalid");
}
Explanation:
Regular expressions can do all of your checking except for the sum of digits check. The checks are i.m.o. easiest if you don't treat the input as a number, but as a string with digits in it.
The regex means:
^ start of string
\d{4} exactly 4 digits
[02468] one of 0, 2, 4, 6 or 8 (this is what makes it even)
$ end of string
Full question:
Suppose that, when you arrive at the sale site for $50 Apple laptops (described in the text) at 1:45 A.M., you find more than 2,000 people already waiting for the site to open. You turn around and go home to get some sleep. Later you buy an Apple laptop, the same model as the $50 one, for $1,070. This indicates that ________.
Answer:
your opportunity cost of waiting at the site (and pushing and shoving) is at least $1,020
Explanation:
If you had decided to stay and wait and go through the hassle of pushing and grabbing in the queue to get a laptop of $50, you would have saved $1020. This is an opportunity that you have not(forgone) used and so you pay for it in the form of increased price of the apple laptop at $1070.
I THINK FROM MY RESEARCH F(N-3)