I need help with these questions: For (1) through (5) , write a single C + + sta
ID: 3714112 • Letter: I
Question
I need help with these questions:
For (1) through (5) , write a single C + + statement that accomplishes each of the following.
(1) Print the message " please enter two numbers. "
(2) Assign the quotient of variables num1 and num2 to variable num3 .
(3) State a remark that the program performs an estimated tax computation.
(4) Input two integer values from the keyboard and store these values in the integer variables first and second .
(5) Write a single assignment statement to translate this algebraic expression.
y = 2 x 2 + 5 x ? 10
Part 4 Topics in Computer Programming - Essentials of the C + + Language
(a)
switch
(i)
character
(q)
0
(b)
comment
(j)
_
(r)
;
(c)
prototype
(k)
#include
(s)
main()
(d)
<<
( l )
*/
(t)
/
(e)
{ }
(m)
const
(u)
header
(f)
!=
(n)
object - oriented
(v)
* =
(g)
1
(o)
logic
(w)
for
(h)
local
(p)
&&
(x)
modulus
Using only the items above fill in the following blanks with the most appropriate response by entering both the corresponding letter in the space provided below as well as the actual answer in the blank space.
There is only one valid response for each question.
_____ (1) A(n) _______________ statement is a program statement that provides an explanatory remark.
_____ (2) The use of a header file requires the use of the ________________ preprocessor directive.
_____ (3) The _______________ operator is one of five binary operators which C + + provides for creating arithmetic expressions.
_____ (4) Each C + + program must include a(n) _______________ function.
_____ (5) A variable name known only to the procedure in which it is declared is known as a(n) _______________ variable.
_____ (6) _______________ programming focuses on objects, the necessary tasks to be performed on the objects and the messages sent to objects.
_____ (7) A(n) function _______________ specifies the return type of the function, the name of the function and the type of any variables passed to the function.
_____ (8) C + + supports three simple variable types: integer, floating point and _______________ .
_____ (9) _______________ files contain predefined values and routines.
_____ (10) Using a statement at the wrong time or with an inappropriate object creates a(n) _______________ error.
_____ (11) if statements and _______________ statements are used to make a selection.
_____ (12) The six conditional binary operators employed by C + + are: = = , > , < , > = , < = and _______________ .
_____ (13) All true expressions are evaluated to 1 whereas all false expressions are evaluated to _______________ .
_____ (14) Two or more conditions may be tested using the Or ( || ) operator or the _______________ operator.
_____ (15) The _______________ qualifier can be used with values that should not change.
_____ (16) The five binary operators employed by C + + to create arithmetic expressions are: + , - , * , % and _______________ .
_____ (17) Programmers can use a while or a(n) _______________ statement to loop.
_____ (18) The cout function displays whatever is passed to it and uses the insertion operator _______________ .
(a)
switch
(i)
character
(q)
0
(b)
comment
(j)
_
(r)
;
(c)
prototype
(k)
#include
(s)
main()
(d)
<<
( l )
*/
(t)
/
(e)
{ }
(m)
const
(u)
header
(f)
!=
(n)
object - oriented
(v)
* =
(g)
1
(o)
logic
(w)
for
(h)
local
(p)
&&
(x)
modulus
Explanation / Answer
As you have posted more than four parts in one question, I have answered the entire second section of your question:
1. (b) comment
2. (k) #include
3. (x) modulus
4. (s) main()
5. (h) local
6. (n) Object Oriented
7. (c) prototype
8. (i) character
9. (u) header
10. (o) logic
11. (a) switch
12. (f) !=
13. (q) 0
14. (p) &&
15. (m) const
16. (t) /
17. (w) for
18. (d) <<
If you like this answer, kindly upvote. It would mean a lot. Thanks.