A week teaching content & goals
Chapter 4 describes the circulation loop structure 4.5 overall structure of the program design, involve multiple typical algorithms. Students can be based on the actual situation, select the appropriate algorithm, reasonable loop structure, programming skilled.
Second, this week the head job
This work belongs to the curriculum | C Programming Language II |
---|---|
Where the job requires | Work requirements |
My aim in this course is | Control loop structure and more typical algorithms |
This job helped me achieve that goal in terms of specific | By job and get feedback from their own problems found during analysis solution |
references | literature |
Third, the work week
1.PTA lab assignments
1.1 Title: The title requires programming, the output from the n-th row begins uppercase A triangular array of the character.
1.1.1 Data processing
data expressed: with the n, number, i, j variables, is an integer type.
data processing:The main function
defined integer variable n, number, i, j
calling function scanf ( "% d", & n)
using for loop for (i = n; i> 0; i--) if i = n, and represents i> 0 i is to be reduced. 1
for (J = 0; J <i; J ++) indicates j = 0, j <i is J plus. 1
the printf ( "% C", 'A' + Number); Print 'A' + Number
Number ++ ;
printf ( "\ the n-");- 1.1.2 Screenshot experiment code
1.1.3 build test data
1.1.4 PTA submit a list and description of
compilation errors: for loop written semicolon comma, no increase after printf ";"1.2 Title:
1.2.1 数据处理
数据表达:result,n,i,j,f整型
数据处理:主函数int main()
定义整型result,n,i,j,f=0;
调用函数scanf("%d",&n);
for(i=2;i<=n;i++)
result=pow(2,i)-1;
for(j=2;j<=sqrt(result);j++)for循环
if(result%j==0) break;跳出循环
if(j>sqrt(result))
printf("%d\n",result);
f++;f加1
if(f==0)
printf("None");- 1.2.2 实验代码截图
- 1.2.3 造测试数据
1.2.4 PTA提交列表及说明
编译错误:题目没看懂
部分正确:没有考虑素数2.代码互评
- 同学代码
我的代码
评:同学代码利用的是if循环里面嵌有while及for循环语句,知识涵盖比较丰富,而我的代码里面只有for循环里嵌入for循环显得很单调入门
3.学习总结
3.1 学习进度条
周/日期 | 这周所花时间 | 代码行 | 学到的知识点简介 | 目前比较迷惑的问题 |
---|---|---|---|---|
10/9-10/12 | 两天 | 87行 | 整型和浮点型,printf,scanf语句,运算符等 | 不知道空格什么时候用 |
10/16-10/18 | 一天 | 90行 | for循环语句 | for语句里面的分号容易遗漏 |
10/23-10/25 | 20小时 | 89行 | 调用函数 | 还没搞清楚调用函数的意义是什么 |
10/30-11/2 | 25小时 | 120 | 四则运算的运用,字符型 | 大括号应该怎么打 |
11/6-11/8 | 2天 | 126 | switch语句 | 题目不会做 |
11.11-11.17 | 10小时 | 190 | 熟悉使用while和do-while结构解决问题 | 题目不会做 |
11-20--11-22 | 10h | 191 | continue和break语句,嵌套循环 | 题目不会做 |
11/27-11/29 | 一天 | 120+ | 循环嵌套 | 题目不会做 |
3.2 累积代码行和博客字数
3.3 学习内容总结和感悟
3.3.1 学习内容总结
- 3.3.2 学习体会
学习循环结构,自我感觉还是很有趣的。循环结构的程序设计,涉及到多个典型算法,又让我开眼界,目前没有什么好疑惑的除了题目不会做,最主要的是比以前要好很多,会很多。