This work belongs courses |
C language programming ll |
Where the job requires |
https://edu.cnblogs.com/campus/zswxy/SE2019-2/homework/9830 |
My aim in this course is |
Computing power and factorial Society, Society of custom function |
In particular aspects of the job which helped me achieve goals |
pta experimental work described function parameters |
references |
"C Programming Language" mind map Baidu |
PTA lab assignments
1.1 Title integer 6-1 determines a sum of the squares of the digits can be divisible by 5
Title Description: Function to write fun, which is: determining an integer and the sum of the squares of the digits can be divisible by 5, can be divisible by 5 returns 1, and 0 otherwise.
1.1.1 Data Processing
- Data are expressed: Defines the integer variable sum, i, sum represents the sum of the digits of the square, i represents the ten-one hundred digital
- Data processing: Use the scanf () input function, while loop statement calculated
- Function parameters: calling function main (), the called function fun (), line parameter n, the argument i, sum
1.1.2 Screenshot experiment code
1.1.3 build test data
12 |
1 |
1 plus the square of the square is equal to 2 5 |
100 |
0 |
The sum of the digits of the square can not be divisible by 5 |
225 |
0 |
It can not be divisible by 5 |
310 |
1 |
Squared plus 1 to 3 and the sum of the squares divisible be 5 |
1.1.4 PTA submit a list and description
- Do not know when you see the topic you want to use the while statement, heard students say I know to use
- Compile error: while () after more than a semicolon
- Compile Error: sum% 5 == 0 wrote the sum% 5 = 0
- Compile error: n / = 10 n = 10 wrote
- Compile Error: n = 0 had a little! "!"
- Partially correct: sum unassigned initial value sum = 0
- Run timeout: n = 0 n = 1 assigned to the!!
- Partially correct: I SUM = SUM + I written SUM = SUM I
1.2 Title 6-3 narcissistic number determination
Description Title: The title required to achieve a function, it is determined whether any integer number daffodils (three digits must be equal on every digit number and the number itself and cubic). E.g. 153 + 5 = 1 ^ 3 ^ 3 ^ 3 + 3 + 1 = 125 + 27 = 153, and 1 155 or not narcissistic number. If the number of daffodils, the function returns 1, otherwise it returns 0.
1.2.1 Data Processing
- Data are expressed: defines the integer variable a, b, c, representing one hundred ten, digit
- Data processing: if-else statements used for outputting the results
- Function parameters: calling function main (), the called function func (), the reference line N, arguments a, b, c
1.2.2 Code Screenshot
1.2.3 build test data
10 |
0 |
Not the three-digit |
100 |
0 |
Members of the cube and the number is not equal to the number itself |
370 |
1 |
Cubic Cubic plus equals 370 3 7 |
1123 |
0 |
1123 is the four-digit |
1.2.4 PTA submit a list and description
- Compile Error: int func (const int N) after more than a semicolon
- Compile Error: N == less a "="
- Compile error: int behind a, b, c defines a plurality N
- Compile error: c = N% 10 = write of Na C 100 B- 10
- Compile Error: N written n
2. Code peer assessment
2.1 Screenshot students Code
Own Code Screenshot
Code comparison
- She is both a integer variable defined separately
- She did not call the scanf function, but direct use do-while statement
- She also used the if-else statement
- I am a direct return (sum% 5 == 0), she defines a z, and then finally return z
- I think she's the code more complicated, but it seems more than I seem easier to understand
2.2 Screenshot students Code
Own Code Screenshot
Code comparison
- She defines only the two of integer variable, I define three integer variable of the same nature
- She uses a while statement and the if-else statement, I only used the if-else statement
- I call scanf function, she used directly while statement
- Our data expressions are not the same, I am a, b, c are carried out operation, a direct expression of her solve the problem
- Her straightforward than some of my code looks simple, but I think my code easier to understand
3. learning summary
3.1 learning progress bar
9/10.23-10.26 |
16 hours |
102 |
Learn while statement is a little knowledge, to understand a little self-defined functions |
3.2 Cumulative lines of code words and blog
the fourth week |
596 |
32 |
fifth week |
1288 |
54 |
Week Seven |
2240 |
174 |
Eighth Week |
3254 |
364 |
Week Nine |
6124 |
512 |
3.3 Summary and perception of learning content
3.3.1 learning content summary
3.3.2 Learning Experience
- Teacher in the class talked about the programming problem, when the result of their own doing was wrong many times, on the DEV-c ++ compiler is right, but wrong a debugging, and finally asked the students to do it
- This week more than a job function parameters and mind mapping, feel knowledge points minds are connected to a line after finishing mind mapping, knowledge of the knowledge of what has been strengthened many
- Weekly assignments will be a little more different topic every time, you can learn something new, previously learned markdown syntax, and then learned to make a line graph, and now learned to do mind mapping
- Before each spend doing blog work very long time, in particular format is always wrong, and now spend less time, and did not appear the wrong format
- Learn self-learning is very important, PTA work is always ahead of us, we have to learn to self-study, to absorb more knowledge