Home /
Expert Answers /
Computer Science /
use-c-question-2-a-study-the-following-figure-2-figure-2-c-program-segments-based-on-the-pa819
(Solved): use c++ (Question 2) (a) Study the following Figure 2 : Figure 2: C++ Program Segments Based on the ...
use c++
(Question 2) (a) Study the following Figure 2 : Figure 2: C++ Program Segments Based on the Figure 2: i. Write the final output. (3 marks) ii. Fill in the output for the Table 1 below. Change the value of \( 1, j, x \) and \( y \) according to the value in the table. Table 1: Tracing Table (12 marks)
if \( ( \) year \( ==9 \mid 1 \) year \( ==10 \) ) dividend \( = \) investment \( * 7.5 \); else if (year \( =7 \mid 1 \) year \( ==8 \) ) dividend \( = \) investment \( * 6.5 \); else if (year \( 5 \mid 1 \) year \( ==6 \) ) dividend \( = \) investment \( * 5.5 \); else dividend \( = \) investment \( * 3.5 ; \) cout \( \ll \) "The dividend is RM " endi;