Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ reads S and n from the user and then displays the area of a regular polygon constructed from these values. 16 marks) QUESTION 4
C++
reads S and n from the user and then displays the area of a regular polygon constructed from these values. 16 marks) QUESTION 4 a) Provide a one sentence description of the following terms: i. null statement (1 mark) assignment operator (1 mark) iii. relational operator (1 mark) b) You are required write a program that should allow a user to enter three courses and a mark for each of three courses. The same program should compare the three marks to determine which one is the highest and display an appropriate message on the screen. The program should demonstrate branching based on relational (AND) operator. (8 marks) c) A conditional operator is the only ternary operator in C++. Provide a general form of a conditional operator and describe what it does. (3 marks) ii. Consider the statement: If x is greater than y, return the value of x; otherwise, return the value of y." The value returned is assigned to z. Write a C++ program that implements the above statement. The program should prompt the user for two numbers and then return the appropriate (6 marks) value 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