C-1 004 jobs

This work belongs courses C-004 jobs
My aim in this course is Understand and master the basic operations for statement
In particular aspects of the job which helped me achieve goals The basic problem applications, mathematical function of the cyclic structure
references C Programming Language (3rd Edition)

1.PTA lab assignments

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

Description Title: The title requires programming, calculates a sequence of 1/2 + 1/3 + ... + N front and Paragraph.
Input format:
input line in a given positive integer N.
Output format:
output section and the value S in accordance with the "sum = S" format in a row, six decimal place. Title ensure that the calculation result does not exceed the double precision.
Sample input:
6
Output Sample:
SUM = 2.450000

1.1.1 Data Processing

Data are expressed: defines the sum, i, a double-precision floating-type variable, define both m, n two integer variables. m, n are intermediate variables required parameters, the final output value i of the input parameter, sum of. The initial value of zero and a predetermined sum
data processing: Application for statement loop structure

1.1.2 Screenshot experiment code

1.1.3 build test data

Input data Output Data
1 sum=1.000000
50 sum=4.499205
100 sum=5.187378

1.1.4 PTA submit a list and description

Submit a list of instructions:

  1. Not for the semicolon separates statements
  2. Did not grasp the value of decimal places

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

Description Title: The title requires programming, calculates the sequence 1 + 1/3 + 1/5 + ... front and N Paragraph.
Input format:
input line in a given positive integer N.
Output format:
output section and the value S in accordance with the "sum = S" format in a row, six decimal place. Title ensure that the calculation result does not exceed the double precision.
Sample input:
23
sample output:
SUM = 2.549541

1.2.1 Data Processing

Data are expressed: shaping defines three variables are m, n, i, the double-precision floating-defined variable sum, sum and a predetermined initial value is 0, the initial value of i is 1.
Data processing: the use of the for loop

1.2.2 Code Screenshot

1.2.3 build test data

1.2.4 PTA submit a list and description

Submit a list of instructions

2. Code peer assessment

2 parts of the code to find the students, and their own code comparison, the proposed peer review of code to try to find coding style quite different.

Screenshot students Code

Own Code Screenshot

3. learning summary

3.1 learning progress bar

3.2 cumulative number of lines of code and blog

3.3 Summary and perception of learning content

3.3.1 learning content summary

  1. Learning and the use of statements for three expressions
  2. Loop statement

3.3.2 Learning Experience

C-language weekly two lessons in my opinion is so precious, busy with other things this week more time to think this course may not be so got the idea last week, so be sure to weigh their own future learning time learning as the most important!

Guess you like

Origin www.cnblogs.com/HhNnanChangSha/p/11699660.html