3. The flowchart (Figure 2) inputs the size of a number of car engines: a value - 1 stops the input. This information is output: average engines size and number of engines with size > 1.5. 0 START Engine - 0 Count Number - 0 INPUT Size Yes is size .-17 Average . Engine/Number OUTPUT Average, Count NO + STOP Yes is size 1.5 Count - Count. NO Number - Number : Engine - Engine Size Figure 2 3 i) Complete the trace table (Table 2) for the input data 1.8. 2.0. 10. 1.3. 1.0. 2.5. 2.0.1.3. 1.8. 1.3 Table 2 (2 marks) Engine Count Number Size Average OUTPUT ii) Based on flowchart given, write a C program to calculate average engines size and number of engines with size > 1.5 (2 marks)
没有找到相关结果