C language I work 05 C language blog work 05 l

L C language blog work 05

problem Reply
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 Society of power and custom functions
In particular aspects of the job which helped me achieve goals PTA job, "c programming language"
references Beep beep miles miles Mind Mapping

 

 

 

 

 

 

 

 

 

 

PTA lab assignments

 

 1.1 Title integer 6-1 determines a sum of the squares of the digits can be divisible by 5

Description Title: Integer fun function, determines whether the input can be divisible by 5, can be divisible by Feedback 1, otherwise 0 feedback.

1.1.1 Data Processing

1. Data expressed: s defines the variable i and shaping.

2. Data processing: Use the scanf () function to enter, circulate through the while statement.

3. Function Parameter: main function main (), the function is called as Fun (), parameter for you, for the arguments i and s.

1.1.2 Screenshot experiment code

 

 1.1.3 build test data

Input data Output Data Explanation
15 0 Plus the square of 5 1 can not be divisible
100 0 It can not be divisible by 5
12 1 5 plus the square of 1 divisible
500 1 Divisible

 

 

 

 

 

 

 

 

 

1.1.4 PTA submit a list and description

 

 The very beginning, there is no clue to this question, listen to the students later explained, referring to the while statement, and then with my classmates, work the problem written out.

1. Compile Error: the beginning will not use a while statement can be said Cookin.

2. partially correct: Know and discuss with students while statement usage, but details still no deal. S did not, for example, initialized.

3. Compile Error: n! 0 = less write! .

4. Compile Error: n! = 0 written n! = 1.

 

5. Compile error: n / = 10 = write less.

1.2 Title 6-3 narcissistic number is determined if the number of daffodils, the function returns a 0 otherwise.

Description Title: By using a three-digit function determines whether a number daffodils, e.g. 153 + 5 = 1 ^ 3 ^ 3 ^ 3 + 3 + 1 = 125 + 27 = 153, and 1 155 or not Narcissus flower 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 variables a, sum.

Data processing: the use of the while statement.

函数参数:主函数main(),被调用函数func(),实参a,sum。

1.2.2 实验代码截图

 

1.2.3 造测试数据

输入数据 输出数据 说明
2 0 不是三位数
101 0 各个位数立方和不等于本身
370 1 各个位数立法和为本身
1000 0 各个位数立方和不等于本身

 

 

 

 

 

 

 

 

1.2.4 PTA提交列表及说明 

 

1.编译错误:再int func(const int N)加了;。

2部分正确:sum += (a % 10) * (a % 10) * (a % 10);这一句中第三个把10粗心写成了1。

3.编译错误:if (sum == N)这一句中把==写成了赋值符号=。

4.部分正确:在if语句后面加上了;。

5.部分正确:在else语句后面加上了;。

2. 代码互评

同学代码截图

自己代码截图

 

 

代码对比

1.她定义了三个整形变量,而我只定义了两个。

2.我在定义的过程中,直接将定义的整形变量初始化,而她是在定义之后初始化。

同学代码截图

 

 自己代码截图

 代码互评

 

1.他分开定义的整形函数,而我是直接一步定义完。

2.我使用的scanf来输入,而他用的do-while语句,我不会用这个语句,但我会去查找它的用法。

3. 学习总结

3.1学习进度条

周/日期 本周所花时间 代码行数 学到哪些知识 目前比较疑惑的问题
第9周 6h 134 自定义函数 对自定义函数的用法上不太明确

 

 

 

 

 

3.2博客字数与代码行数

 

时间 博客字数 代码行数
第四周 600 18
第五周 653 20
第七周 880 134
第八周 1143 138
第九周 1252 145

 

 

 

 

 

 

 

 

 

 

 

3.3 学习内容总结和感悟

3.3.1 学习内容总结

 

3.3.2 学习体会

我发现越往后面走,难度越来越大,每天接受的知识也越来越多,感觉有点力不从心,PTA的作业也开始变得要花费很长的时间去解决。也许是我花费的课外时间不够,不能够去解决课上没有讲到但又出现的问题,以后的时间我会多利用课外时间来听网课,提前了解到一下上课没有提到的内容,让自己走在前面。

 

Guess you like

Origin www.cnblogs.com/xcp0210CP/p/11742367.html