One, PTA Laboratory work Topic 1: Use the function to determine the total square number (1). PTA Submission List
(2). Design ideas
1. First step: Define two floating-point variable number,r;
2. The second step: the opening square of n is given number;
3. Step three: R=n/number;
4. Fourth step: If R=number, return 1; return 0;
5. Fifth Step: If n is 0, return 1;
(3). Problems encountered during commissioning and solutions
Problem:
The code doesn't pass when n=0 this test point.
Workaround: Write 0 as a special case, when n is 0 o'clock return 1;
Topic 2: Use the function to output an inverse number of integers (1). PTA Submission List
(2). Design ideas
1. First step: Define two integer variable r,a;
2. Step Two: If number is not equal to 0, enter the third step, otherwise enter the sixth step;
3. Step three: r=number%10;
4. Fourth step: a=a*10+r;
5. Fifth step: NUMBER=NUMBER/10; return to the second step;
6. Sixth step: Return A;
(3). Problems encountered during commissioning and solutions
Problem:
Workaround:
Topic 3: (1). PTA Submission List (2). Design ideas
1. The first step:
2. Step Two:
3. Step Three:
4. Step Fourth:
5. Step Fifth:
6. Step Sixth:
7. Step Seventh:
8. The first step:
9. Step Nineth:
(3). Problems encountered during commissioning and solutions
Problem:
Workaround:
Second, peer code pairs of peer review 1. Mutual evaluation of Students name
Zheng Wei
2. My Code, mutual evaluation of the student code
My Code:
Classmate Code:
3. Where do I differ from my classmates ' code? What are the advantages? What style of code do you prefer? If the classmate code is wrong, please help to point out where the problem. Third, this week's topic set PTA Final ranking four, this week study summary 1. What have you learned?
(1).
(2).
(3).
(4).
2. This week's content, you are not what?
C Language Fifth Blog job---function