Answer:
function myFunction() {
myNumber = Math.floor(Math.random() * 100) + 1 ;
var values = ["Number is even", "Number is odd"] ;
var stringNum = " ";
if (myNumber % 2 === 0){
stringNum += values[0];
} else {
stringNum += values[1];
document.getElementById("demo").innerHTML = stringNum;
}
Explanation:
The javascript source code is used by the browser to make the web application interactive, making a clickable event for the button to generate an H1 header for the web page.
The myFunction is assigned to an onclick event of a html button tag to display if a random number between 1 and 100 is even or odd.
Incomplete question. The Options read;
A. The year purchased
B. Brian's classmates
C. The amount of memory
D. The type of operating system
Answer:
<u>B. Brian's classmates</u>
Explanation:
<em>Remember,</em> the question is concerned about <em>"the individuals"</em> in the data set, <u>so the year they purchased their computer, neither is the amount of memory of the computer and the type of operating system can be classified as individuals in the data set.</u>
Hence, we can correctly say, only Brian's classmates are the individuals in this data set.
Is one of the answers thumbnail? If so, select it.
What language are you programming in?
<span>If you are programming in C or C++, you could do something like this: </span>
<span>#include <iostream> </span>
<span>using namespace std; </span>
<span>int main(void) </span>
<span>{ </span>
<span>//declarations </span>
<span>double item1 = 0; </span>
<span>double item2 = 0; </span>
<span>double item3 = 0; </span>
<span>double item4 = 0; </span>
<span>double item5 = 0; </span>
<span>double subtotal = 0; </span>
<span>double total = 0; </span>
<span>double tax = 0; </span>
<span>//Enter Items </span>
<span>cout << "Please enter the price of item 1"; </span>
<span>cin >> item1; </span>
<span>cout << "Please enter the price of item 2"; </span>
<span>cin >> item2; </span>
<span>cout << "Please enter the price of item 3"; </span>
<span>cin >> item3; </span>
<span>cout << "Please enter the price of item 4"; </span>
<span>cin >> item4; </span>
<span>cout << "Please enter the price of item 5"; </span>
<span>cin >> item5; </span>
<span>//Compute subtotal </span>
<span>subtotal = (item1 + item2 + item3 + item4 + item5 + item6); </span>
<span>//Compute amount of tax </span>
<span>tax = subtotal * (.06); </span>
<span>//Compute total </span>
<span>total = subtotal + tax; </span>
<span>//Display subtotal, total, and amount of tax </span>
<span>cout < " The subtotal of the sale is: " << subtotal << endl; </span>
<span>cout < " The amount of sales tax is: " << tax << endl; </span>
<span>cout < " The total of the sale is: " << total << endl; </span>
<span>return 0; </span>
<span>}//end of function main </span>
<span>I know this is a very very basic C++ program but I hope it helps and good luck on your project!</span>