Jasmine is trying to write a code for her project but it would not compile or the output is out of expectation. Identify
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Jasmine is trying to write a code for her project but it would not compile or the output is out of expectation. Identify
statement [7 marks] 1. include <stdio.h> 2. int main() 3. ( 4. integer radius = 0; 5. float area = 0, perimeter = 0; 6. do 7. 8. 9. { printf("Please key in your radius of a circle in centimeter: "); scanf(%d, radius); } while (radius < 0) 10. 11. area = 3.142 * radius * radius; perimeter = 2 * 3.142 * radius; 12. 13. printf("The area = %d cm2 and the perimeter = %d cm./n", Area, Perimeter); 14. return 0;
Jasmine is trying to write a code for her project but it would not compile or the output is out of expectation. Identify at least seven (7) syntax errors with line number stated and suggest the correct