Question: In this question, you will use two different programming environments (IDEs) to edit, debug, and execute a simple C program. The basic part of C

 In this question, you will use two different programming environments (IDEs)to edit, debug, and execute a simple C program. The basic part

In this question, you will use two different programming environments (IDEs) to edit, debug, and execute a simple C program. The basic part of C program is similar to Java. The purpose of the homework is to learn the programming environments. Read textbook Section 2.2.3, the tutorial in section I, and Unix tutorial Appendix B.2. Use GCC on ASU General Seer and a text editor to enter the program on textbook page 41 (the code is given on the next page). Compile, debug (find and fix any syntax errors), and execute the program and fix any semantic errors, for example, by adding "break" statements in the required places and by fixing incorrect characters copied into the programming environment, if any, and by type changing to print a floating point number. Use Microsoft Visual Studio to execute the same program given above. Compile, debug (find and fix any syntax errors), and execute the program and fix the semantic errors. Discuss and explain differences in compiling, editing, debugging, and executing that you observed in using GCC and Visual Studio. You must discuss and explain differences in each of the 4 tasks underlined above to receive all 5 points. Use a for-loop in the code given above to accept 5 user inputs. Use an input statement such as ch = fgetchar(): to replace the assignment statement ch = '+': You can use either GCC or Visual Studio to complete this question. Please refer to the expected output word document for further clarification. Submit the rewritten program. Note, you may need to use fflush(stdin) to flush the newline character left behind by a previous operation before using fflush(stdin). Hw01q2.1: ch: + f = 30 ch = - ch = x f = 200 ch =/ f = 0.50 ch = invalid operator hW01q2.3: If the input is '+' then the output should be "f = 30": If the input is '-' then the output should be "f" = -10". If the input is '*' then the output should be "f = 200". If the Input is '/' then the output should be "f = 0.5". (Any other equivalent of one half is fine, ex: 0.50) Any other input should result in "invalid operator" + = -f- = f = 200 /f = 0.50 invalid operator In this question, you will use two different programming environments (IDEs) to edit, debug, and execute a simple C program. The basic part of C program is similar to Java. The purpose of the homework is to learn the programming environments. Read textbook Section 2.2.3, the tutorial in section I, and Unix tutorial Appendix B.2. Use GCC on ASU General Seer and a text editor to enter the program on textbook page 41 (the code is given on the next page). Compile, debug (find and fix any syntax errors), and execute the program and fix any semantic errors, for example, by adding "break" statements in the required places and by fixing incorrect characters copied into the programming environment, if any, and by type changing to print a floating point number. Use Microsoft Visual Studio to execute the same program given above. Compile, debug (find and fix any syntax errors), and execute the program and fix the semantic errors. Discuss and explain differences in compiling, editing, debugging, and executing that you observed in using GCC and Visual Studio. You must discuss and explain differences in each of the 4 tasks underlined above to receive all 5 points. Use a for-loop in the code given above to accept 5 user inputs. Use an input statement such as ch = fgetchar(): to replace the assignment statement ch = '+': You can use either GCC or Visual Studio to complete this question. Please refer to the expected output word document for further clarification. Submit the rewritten program. Note, you may need to use fflush(stdin) to flush the newline character left behind by a previous operation before using fflush(stdin). Hw01q2.1: ch: + f = 30 ch = - ch = x f = 200 ch =/ f = 0.50 ch = invalid operator hW01q2.3: If the input is '+' then the output should be "f = 30": If the input is '-' then the output should be "f" = -10". If the input is '*' then the output should be "f = 200". If the Input is '/' then the output should be "f = 0.5". (Any other equivalent of one half is fine, ex: 0.50) Any other input should result in "invalid operator" + = -f- = f = 200 /f = 0.50 invalid operator

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!