First, the PTA experimental work Title 1:7-2 to find the number of integers in the sequence of the most occurrences of 1. PTA Submission List 2. Design ideas
定义number数组存放数字,count数组存放出现次数 定义i控制第一层循环,j控制第二层循环,N表示有N个数字,max为比较出现次数时候使用的最大值 for i=0 to <1000 { 清零count[i]=0 } while(输入N){ for i=0 to <N {//按顺序取数 输入number[i] for j=0 to <N {//和所有数比较 如果出现了相同的数则给次数加上一次 } } for i=0 to <N { 比较出count数组中最大的值 并将其赋值给max } 输出出现次数最多的数和它出现的次数 }
3. Code 4. The debugging process encountered problems and PTA submission List of the status note.
- In the Code of statistics number occurrences do not know what to use as the end of the logo solution: the Internet to read someone else's code, learning while (scanf ("%d", &n)!=eof) to enter a value in the condition and this program only executes once
Topic 2:7-4 simplified insertion sort 1. PTA Submission List 2. Design ideas
定义number数组存放数字,count数组存放出现次数 定义i控制第一层循环,j控制第二层循环,N表示有N个数字,max为比较出现次数时候使用的最大值 for i=0 to <1000 { 清零count[i]=0 } while(输入N){ for i=0 to <N {//按顺序取数 输入number[i] for j=0 to <N {//和所有数比较 如果出现了相同的数则给次数加上一次 } } for i=0 to <N { 比较出count数组中最大的值 并将其赋值给max } 输出出现次数最多的数和它出现的次数 }
3. Code 4. The debugging process encountered problems and PTA submission List of the status note.
- In the Code of statistics number occurrences do not know what to use as the end of the logo solution: the Internet to read someone else's code, learning while (scanf ("%d", &n)!=eof) to enter a value in the condition and this program only executes once
Topic 3:7-10 Yang Hui triangle 1. PTA Submission List 2. Design ideas
定义number数组存放数字,count数组存放出现次数 定义i控制第一层循环,j控制第二层循环,N表示有N个数字,max为比较出现次数时候使用的最大值 for i=0 to <1000 { 清零count[i]=0 } while(输入N){ for i=0 to <N {//按顺序取数 输入number[i] for j=0 to <N {//和所有数比较 如果出现了相同的数则给次数加上一次 } } for i=0 to <N { 比较出count数组中最大的值 并将其赋值给max } 输出出现次数最多的数和它出现的次数 }
3. Code 4. The debugging process encountered problems and PTA submission List of the status note.
- In the Code of statistics number occurrences do not know what to use as the end of the logo solution: the Internet to read someone else's code, learning while (scanf ("%d", &n)!=eof) to enter a value in the condition and this program only executes once
Second, this week's topic set PTA Final ranking. Third, peer code peer review 1. Mutual evaluation of the name of the students 2. My Code, mutual evaluation of the classmate Code 3. I and the classmate code is different where? What are the respective advantages? What style of code do you prefer? If the classmate code is wrong, please help to point out where the problem. Iv. Study Summary of the Week 1. What did you learn? How do I store strings in 1.1 C? 1.2 What is the end flag of a string and why do you want to end the flag? 1.3 What are the methods for string input? 1.4 Numeric characters How to turn an integer, write a pseudo-code? 1.5 16 binary, binary string how do I turn 10 binary? Write pseudo-code? 2. This week's content, you are not what? 3. Midterm Summary 3.1 Why do you think you didn't do well? 3.2 List the wrong questions. 3.3 The second half semester how to adjust C's study?
C Language Blog Job--array