当前位置:网站首页>C language I blog assignment 03

C language I blog assignment 03

2020-11-08 10:29:58 Listening to the rain

Which course does this assignment belong to https://edu.cnblogs.com/campus/zswxy/CST2020-4
Where are the requirements for this assignment https://edu.cnblogs.com/campus/zswxy/CST2020-4/homework/11455
The goal of this assignment Have a good command of for Use circularly , master sqrt usage , Experience the programmer working overtime and staying up late in advance
Student number 20209056

1.PTA Experiment assignment (15 branch / topic )

1.1 Electronic Wang

It is said that Wang Xingren's IQ can reach that of human beings 4 The level of a year old child , More intelligent Wang can do addition calculation . For example, you put two piles of balls on the ground , There were 1 A ball and 2 A ball , Smart Wang can use “ Wang ! Wang ! Wang !” Express 1 Add 2 The result is 3.
You are required to do a simulation program for the electronic pet Wang , According to the number of two piles of balls recognized by the electronic eye , Work out and , And give the answer with Wang Xingren's call .

1.1.1 Screenshot of experimental code

1.1.2 Data processing

Data expression : Defined x,y,z,h, They are used to input 、 Calculation 、 Compare , among h The initial value of is set as 1, The type is an integer variable .
Data processing : Applied to do while sentence .

1.1.3 PTA Submit list and description


explain : No obstacles encountered .

1.2 subject 2 Calculate factorial sum

1.2.1 Screenshot of experimental code

1.2.2 Data processing

Data expression : Defined x,y,z,h, among y and z The initial value is set to 1,h The initial value is set to 0, The type is an integer variable .
Data processing : Use of the for sentence

1.2.3 PTA Submit list and description

· Q1: The first two times I didn't know the cause of the error .
· A1: After examination, it was found that there was no definition h and z.

· Q2: The first problem was corrected and then compiled again. It was found that &
· A2: Add later &

· Q3: The reason for the third problem has been forgotten .
· A3: Finally, through my own efforts , Completed the title

1.3.PTA Submit list and description

1.3.1 Screenshot of experimental code

1.3.2 Data processing

Data expression : Defined x, y, z, S,sum Five variables , among x, The initial value is set to 1, The type is double precision floating point .
Data processing :for Simple application of loops

1.3.3 PTA Submit list and description


· Q1: Twice partially correct
· A1: Twice in a row, it's partially correct, and I'm transferring the code to Dev-c++ To correct .

2. Reading the code (-5——5 branch )

Find a good code , Understand code functions , And tell us what you can learn from the code you have chosen . Reference website :
ACM Problem solving
leecode Interview several questions website .

subject

hold M Put the same apple on the N On the same plate , Some plates are allowed to remain empty , How many different methods are there ?( use K Express )5,1,1 and 1,5,1 It's the same division .

Code :


The previous input is beyond my comprehension , But the meaning can still be understood in a general sense , He first set up a mathematical model for solving problems , Finally, it is realized by programming .

3. Learning summary (15 branch )

3.1 Learning progress bar (5 branch )

Zhou / date Time spent this week Lines of code Brief introduction of the knowledge learned The confusing question at present
10/12——10/18 20h 157 Simply copy the book and hit the code
10/19——10/26 35 481 Learned if Statement and can understand the meaning of the code
10/27——11/8 67 832 You've learned most of the cycle , Be able to understand the code and other functions that have been learned The inability to use various sentences , It's very difficult to use nested statements

3.2 Accumulate lines of code and blog words (5 branch )

Time Blog words ( character ) Lines of code
The first week 1987 157
In the second week of 1532 481
The third week 4562 832

3.3 Learn to understand (5 branch )

Sentiment :1、 This week, the teacher as always did not talk about what content , But I learned to be more and more efficient , When I encounter problems, I like to ask others at the first time , I hope I can be better in the future .
2、 I don't study hard enough , There are a lot of good people around , I want to learn more from them , Otherwise, how can we stand out in the fierce competition in the future .
3、 Originally, I wanted three questions of the first big question to hang 15 points of the ladder of heaven , It turns out that I can't do it at all , There is still a lot to learn , come on. , Continue to work hard !

版权声明
本文为[Listening to the rain]所创,转载请带上原文链接,感谢

随机推荐