C language blog work 04

problem answer
This work belongs to the curriculum C Programming Language II
Where the job requires https://edu.cnblogs.com/campus/zswxy/CST2019-4/homework/9772
My aim in this course is PTA accurate and complete work faster
This job helped me achieve that goal in terms of specific Help me find a job through the job I pitfalls
references PTA common issues, C language programming

1.PTA lab assignments

7-1 1.1 N seek one-half sequence and the first N

Content Title: The title requires programming, calculates a sequence of 1/2 + 1/3 + ... + and the first N.

1.1.1 Data Processing

Data are expressed: I used m, i, n these three variables are integer variables, as well as double precision floating point scalar i tem, sum.
Data processing: I used the first N and the sum formula and for statements.

1.1.2 Screenshot experiment code

1.1.3 build test data

Input data Output Data Explanation
6 2.450000 no
9 2.828968 no
1 1.000000 Because the first term is a
100 5.187378 no

1.1.4 PTA submit a list and description


Commit List Description
Q1: multiple display wrong answer, I checked and no punctuation error.
A1: I reviewed PTA common system errors and the Internet to find relevant information and under the guidance of the students, I found my line of code there is a problem.

1.2 Pursuit of 7-2 minutes and a first N odd sequence

Content Title: The title requires programming, calculates the sequence 1 + 1/3 + 1/5 + ... and the first N.

1.2.1 Data Processing

Data are expressed: I define an integer variable n, two double precision floating-point scalar.
Data processing: I used the for statement.

1.2.2 Code Screenshot

1.2.3 build test data

Input data Output Data Explanation
23 2.549541 no
55 2.985428 no
33 2.730028 no
11 2.180875 no

1.2.4 PTA submit a list and description


Description submit a list of
compilation errors: ignoring malformed.
Partially correct: there is no requirement to consider the subject, and is one of the odd points.
The answer correctly: corrected for m cycles, and each time plus 2.

2. Code peer assessment

Students Code

Own Code Screenshot

The student code more straightforward, is relatively short, and my long code, use the item variable, not very common, even more profound, difficult to understand ordinary people.

3. learning summary

3.1 learning progress bar

time Time spent Lines of code Learned knowledge Introduction Currently more confusing issues
the fourth week 5 87 Use the loop Buyer No

3.2 Cumulative lines of code words and blog

3.3 Summary and perception of learning content

3.3.1 learning content summary

Main points of the fourth week is to use the loop statement, a little like the number of columns in mathematics, so I think it is necessary to learn mathematics, we can develop logical thinking.

3.3.2 Learning Experience

C language is an enigmatic course, review and consolidate, then the heart is not difficult to learn of. It will be very difficult at the beginning, some obscure. Review what you have learned a lot of lessons in advance prep school to learn, it will help us a good grasp this course.

Guess you like

Origin www.cnblogs.com/Olong/p/11698126.html