L #C language blog work 05

This work belongs courses C language programming ll
The job requirements https://edu.cnblogs.com/campus/zswxy/SE2019-4/homework/9832
My aim in this course Learn to use custom functions and custom functions
This job helped me in terms of what specific goals However, your own custom mathematical functions factorial sum, the number of petals and other issues
references markdown basic syntax, C language programming, Baidu

6-3 narcissistic number judgment

  • b ten digits indicate an error
    made test data
Input data Output Data Explanation
153 1 In line with the number of daffodils
97 0 The number does not comply with daffodils
-13 Can not be output Narcissistic number can not be negative

Data are expressed: defines the integer a, b, c, i, and Result, daffodils a three-digit number n, a, b, c n of one hundred, ten, bit
data processing: experimental guidance image twenty-eight page content, like the n split into three three-digit numbers. Using the equality operator if-else branch structure and
the same time using a power function to seek cubic
function parameters: int main () function is the main tune, int func (const int N) of the called function

Analyzing 6-1 digits of an integer and the sum of the squares can be divisible by 5

  • return the wrong letters
  • Less initial m = 0

Create test data

Input data Output Data Explanation
12 1 Square and can be divisible by 5
123 0 5 and can not be divisible by the square
31.5 Can not be output Requirements integer numbers

Data are expressed: defines the integer m, n, n incoming parameter
data processing: if-else using a branch structure or a zero output, while the cyclic structure to help to find a digital sum of the squares
function parameters: int main () is calling function, int fun (int n) is the called function

Code peer assessment

My code

classmates code

  1. Students use a while loop
  2. Students also use the + = / =
    3. But I use the power function of adding the outcome, multiplied by three students wrote
    my code

    classmates code

    1. The student code more concise
  3. The students use the power function to calculate
    3. I used the conditional if-else statement he

3. learning summary

31. study progress bar

Week / Week This week the time spent Lines of code Learned knowledge Introduction Currently more confusing issues
Sixth Week 8h 120 Fahrenheit and Celsius temperature conversion How to convert more quickly
Week Seven 12h 180 if-else statement Some symbols input and output
Eighth Week 9h 270 for loop Decimal digits reserved
Week Nine 13 400 Custom Functions Some formatting issues tables and graphs
time Words blog The number of lines of code
Sixth Week 650 120
Week Seven 1450 180
Eighth Week 2100 270
Week Nine 2700 400

Learning content summary and insights

  • The study defined a custom function declarations use; function does not require header
  • The feeling improved significantly more difficult than the last, this attempt to use the while statement
  • Work is slow, try to improve the efficiency of
    Mind Mapping

Guess you like

Origin www.cnblogs.com/yzc2416686584/p/11741785.html