Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Lab Target (1) Get familiar with math operators in C language (2) Master the way of getting information during program execution (3) Gain ability

image text in transcribed

1. Lab Target (1) Get familiar with math operators in C language (2) Master the way of getting information during program execution (3) Gain ability of writing programs to solve real file problem 2. Tools Operation System: Windows XP Programming Language: C Textbook: C Programming A Q&A approach 3. Tasks (After finish the following tasks, hand in Lab Reports, all source code, and snapshot of running results) 3.1 Task One Write a program to calculate the surface area of a circle. The program must ask the user to provide the information of the radius of a circle from keyboard input. It then takes the value to calculate the surface area, and prints out the results on the screen. Note: you should define a constant to store PI3.141593. 3.2 Task Two Every student has the information as below: studentID(integer), math(float),chinese(float),computer(float). Make a program to input two students' information via the keyboard and writes the achievement information of two students in a file named as 'score.txt" (1) Suggestion interface is as below (Change the data if you want): D:hap 2018-2019 2018 PERRITA\Labs Lab4\Task_ifrojects Please input studenti's ID: 1881 Please input studenti's scores for math.chinese.computer : 20 88 29 Please input student2 ID: 1802 Please input student2's scores for math.chinese.computer : 100 90 29 D uretat 0 0 SCREELEL - 20% B ) ) ) 36 180190.000000 1802 100.000000 88.000000 90.000000 79.000000 79.000000 3.3 Task Three After you finish the 3.2 task, you have a file that contains the information of two students. Please make a program to read the information from the file 'score.txt'. You should output the average score for every student on screen. Suggestion interface is as below, but not limited to (Change the data if you want): OD:Tharp 2018-2019 2018 PR V A Labu LabTask 1 Troject 1. IRR 90.000 88.68 77.000000 Average Score: 85.67 1882 109.80000 99.000 29. AverageScore 189.67 1. Lab Target (1) Get familiar with math operators in C language (2) Master the way of getting information during program execution (3) Gain ability of writing programs to solve real file problem 2. Tools Operation System: Windows XP Programming Language: C Textbook: C Programming A Q&A approach 3. Tasks (After finish the following tasks, hand in Lab Reports, all source code, and snapshot of running results) 3.1 Task One Write a program to calculate the surface area of a circle. The program must ask the user to provide the information of the radius of a circle from keyboard input. It then takes the value to calculate the surface area, and prints out the results on the screen. Note: you should define a constant to store PI3.141593. 3.2 Task Two Every student has the information as below: studentID(integer), math(float),chinese(float),computer(float). Make a program to input two students' information via the keyboard and writes the achievement information of two students in a file named as 'score.txt" (1) Suggestion interface is as below (Change the data if you want): D:hap 2018-2019 2018 PERRITA\Labs Lab4\Task_ifrojects Please input studenti's ID: 1881 Please input studenti's scores for math.chinese.computer : 20 88 29 Please input student2 ID: 1802 Please input student2's scores for math.chinese.computer : 100 90 29 D uretat 0 0 SCREELEL - 20% B ) ) ) 36 180190.000000 1802 100.000000 88.000000 90.000000 79.000000 79.000000 3.3 Task Three After you finish the 3.2 task, you have a file that contains the information of two students. Please make a program to read the information from the file 'score.txt'. You should output the average score for every student on screen. Suggestion interface is as below, but not limited to (Change the data if you want): OD:Tharp 2018-2019 2018 PR V A Labu LabTask 1 Troject 1. IRR 90.000 88.68 77.000000 Average Score: 85.67 1882 109.80000 99.000 29. AverageScore 189.67

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students also viewed these Databases questions