C language I blog 008 jobs

This work belongs to the curriculum C Programming Language II
Where the job requires http://edu.cnblogs.com/campus/zswxy/SE2019-3/homework/9982
My aim in this course is Familiar with while and do-while structure to solve the problem.
This job helped me achieve that goal in terms of specific Learn the differences between the for, while, do-while loop
references Students Code

1.PTA lab assignments

1.1 topic name

For a given positive integer N, the number of bits required it and the sum of the digits.

Input format:
Enter a given line does not exceed 10
. 9
positive integer N.
Output format:
output bits of the N and the sum of the digits in a row, separated by a space.

1.1.1 Data processing:

Defines a, temp, i, sum been assigned, they are a function of the integer
data representation
(input two integer variables)
(with the value 0)
(variable integer)
using the sum + = seek you figures and
use temp / demand-digit

1.1.3 build test data

Input data Output Data
110 3 2

1.1.4 PTA submit a list and description

1.2 topic name

7-2 Han soldiers (10 points)

In the history of Chinese mathematics, a widely circulated "Han Xin Troops" story: Han Han emperor Liu Bang men generals, his heroic, resourcefulness superior, outstanding credit to the establishment of a Han Dynasty. It is said that the level of mathematics Han is also very superb, when he soldiers on, in order to know how much less ## soldiers, while keep military secrets, let reported that the number of soldiers line up:

From 1 to 5 according to the number of packets, a note of the number of the last packet of a soldier;
then the number of packets from 1 to 6, the number of packets last note of a soldier is 5;
then the number of packets from 1-7, write down the number reported last a soldier is 4;
press the number reported from 1-11, a soldier reported the number of the last 10;
write a program to calculate the minimum number of Han soldiers.
Input Format:
This question No Input
Output formats:
Output number of soldiers have at least the Han.

1.2.1 Data Processing

Function input integer i, represents the number of reported human
pseudocode
used while statement has cycles;

While circulating the if statement to judge, as long as they emptied break out of the cycle;

Otherwise, continue to cycle variable n ++;

1.2.2 Screenshot Code

1.2.3 build test data

Input data Output Data
This problem no input 2111
1.2.4PTA submit a list and description

2 Code peer assessment


3. learning summary

3.1 learning progress bar

3.2 Cumulative lines of code words and blog

Week / Date This week spend time code
The fourth week /9.16~9.22 7 hours
Fifth week /9.23~9.29 8 hours
Sixth week /9.30~10.6 11 hours
Seventh week /10.7~10.13 24 hours
Eighth week /10.14-10.20 25 hours
Week Nine /10.21-10.28 25 hours
The tenth week /10.28-11.3 26 hours
Week 11 /11.3-11.10 Difference while and do-while the

3.3 Summary and perception of learning content

3.3.1 learning content summary

Please use the form of the sort of mind map of what you have learned so far

3.3.2 Learning Experience

Guess you like

Origin www.cnblogs.com/csmzlw53719/p/11845610.html