Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please answer the following questions about C++ Important: Type your answers legibly. Use the space provided under each question (or expand the space if needed).
please answer the following questions about C++
Important: Type your answers legibly. Use the space provided under each question (or expand the space if needed). Plagiarism in any form is penalized. Good luck. Q 1. Write the definition of a loop (5 points). Write the necessary statements in C++ that use a for loop, to ask for 30 numbers of int type as inputs ( 5 points), and to find the sum of those inputted numbers ( 5 points) and display the result ( 5 points). Q 2. Explain what a comment is, and what is its use in programming ( 6 points)? What are the two types of comments (4 points)? Write an example in C++ for each type of comment ( 10 points). Q 3. Answer the following. ( 20 points) a) Define and explain with an example the role of relational operators in C++. (10 points) b) Define and explain with an example the role of a Variable in C++ program. (I0 points) Q 4. Explain what Hinclude Directive is ( 5 points), give an example ( 5 points) and explain its role ( 10 points). Q 5. Write the necessary statements in C++ that use a for loop, to ask for first name and last name of FIVE people as inputs ( 10 points) and display the names back on to the output screen (10 points) Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started