Home Work -1 2.9) Write a single statement or line that accomplishes each of the following a) Print the message “Enter two numbers”. Answer: std::cout<< “enter two numbers”; b) Assign the product of variables b and c to variable a Answer: int a=b*c; c) State that a program performs a payroll calculation (i.e., use text that helps to document a program) Answer: // program performs a payroll calculation (or) /*program performs a payroll calculation*/ d) Input three integer values from the keyboard into integer variables a, b and c. Answer: std::cin>>a>>b>>c; 2.11) Fill in the blanks a) What arithmetic operations are on the same level of precedence as multiplication?__________ …show more content…
Reason: C++ applies the operators in arithmetic expression in precise order determined by these rules of Operator precedence. b) When parentheses are nested, which set of parentheses is evaluated first in an arithmetic expression? Answer: Inner most parentheses Reason: Parentheses are used to specify the order of evaluation. Expressions within the parentheses are evaluated first. If parentheses are nested, the inner most parentheses is evaluated first. c) A location in the computer’s memory that may contain different values at various times throughout the Execution of a program is called a variable. 2.12) Answer x=2,y=3 a) cout<<<< “x=”; Answer : x= d) cout<< “x=”<<<< “=”<>x>>y; Answer : nothing h) //cout<< “x+y=” <<< “\n”; Answer :
The words in parenthesis are the base words. If a definition refers to the base word, you need to find the meaning of the base word in order to understand its meaning.
RAM: RAM stands for Random Access Memory. It is a bit like a person's short-term memory. RAM is volatile so data only exists only when the computer is turned on, and is used by the operating system and other applications.
RAM (Random Accesses Memory): RAM is used by CPU when a computer is running to store the information that it needs to be used very quickly but it does not store any information permanently.
When bush says" The pictures of the airplanes flying into building's fires burning, huge – structures collapsing have filled us with disbelief , terrible sadness, and quiet, underlying angle" (6-9). Bush's reason for including such complex syntax in this speech is because he is a really good speaker and he had to calm down America after this tragedy so he put all of the sad things in one sentence so he can just get it over with. Bush also uses signs of parenthesis in his text to add meaning in his sentences or put more information into a sentence to really elaborate on the subject. Bush uses parentheses when he says" Today, our nation saw evil – the very worst of human nature – and we responded with the best of America" (Bush 14-15). Bush uses parenthesis in that sentence to explain what evil Is and to put more context into his
Which of the following are correct, according to the AP Stylebook's guidelines related to parentheses?
The discussion begins with bracket I
When you are multiplying fractions you multiply the numbers on top as well as the numbers on the bottom. For example:
4. The calculation should be executed only after all the valid input values are provided.
the set of productions P consisting of: S → 0AB, S→ 1B, A → 1B01, B → 100.
//last value is sorted once you get to it so no need to perform sort on that part
Comma’s allow the reader to read and follow a longer and more complicated sentence without having to strain on the description. There are several rules when using commas such as not putting them between a subject and a verb or using a comma splice to join short sentences. Parentheses allow you to insert ideas or material without confusing the reader. They can also be used for citations or references when quoting a book. Parentheses can also be used when adding a reference pointing the reader to a diagram or figure located in a
In order to precisely evaluate an expression involving the division of decimals, there are certain steps to ensure success:
The reason why "it all works the same" no matter how many bits we have in our registers is no different than elementary school math with base 10 (decimal) numbers. If you add 9 + 1 which are both in the ones column you say 9 + 1 = zero carry the 1. you carry a one over to the tens column then 1 plus 0 plus 0 (you filled in two zeros in the tens column) is 1 carry the zero. you have a 1 in the tens column and a zero in the ones column
That is how I understand it anyway. I think the formula for this is; .
2) Of the following if statements, which one correctly executes three instructions if the condition is true?