Question: (5 Develop a C program that accept N numbers as current input (mA) from the end user (Ammeter). Then receives values for these n numbers
(5 Develop a C program that accept N numbers as current input (mA) from the end user (Ammeter). Then receives values for these n numbers and store them in an array named 'arr_current. Then, arrange the numbers in the descending order and print them. Find and display the even current from the list of those n numbers. Hint: N = 3 [input from end user] 3 values for N-33,12,57 (input from end user) Display these numbers in descending order -57,33,12 Display even current - 12 - (10 marks) (5 marks) (c) Figure 22 shows the programming for a program (0) Justify the reason of the program inserted includesmath.h> (Refer to Line 6). (2 marks) (0) Specify the errors in the program and rewrite the correct code. (4 marks) (ii) Produce the output of the corrected code attained in Question 2(c)(1) when user executed 2 of side (4 marks) 7C program to end resequilateral triangle 2. Binclude catd 3. #include Cat 4. int main( 5. 6. float side, area: 7. Input side of equilateral triangle / 8. print("Enter side of an equilateral triangle: "); 9. scanf("\", cide): 10. l. Calculate area of equilateral triangle / 11. area - (aqrt(3)/4) * (side-side) 12. /* Print resultant area / 13. printf("Area of equilateral triangle - 4.24 9. units" area): 14. return 0; 15.) Figure Q2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
