This blog post is based on the index of the C language programming column. Click on the topic below to jump to the blog post, which is more convenient for everyone to read and browse~

**the first week**

C language programming The first week Input the value of the radius r of the circle, and output its area.

C language programming The first week Enter a certain day, certain month, and determine that this day is the day of the year.

C language programming The first week Output 9*9 multiplication table.

C language programming The first week There are 1, 2, 3, 4, and 4 numbers. How many different three-digit numbers can be formed without repeated numbers? How many are they?

C language programming The first week Print out all the "daffodil numbers". The so-called "daffodil numbers" refers to a three-digit number, and the sum of the cubes of the digits is equal to the number itself.

C language programming The first week Use the nesting of conditional operators to complete this question: students with academic performance =90 points are represented by A, those with a score of 60-89 are represented by B, and those with less than 60 points are represented by C .

C language programming The first week Input two positive integers m and n, and find the greatest common divisor and least common multiple.

**the second week**

C language programming The second week Print the diamond pattern.

C language programming The second week There is a sequence of scores: 2/1, 3/2, 5/3, 8/5, 13/8, 21/13... Find the sum of the first 20 items of this sequence.

C language programming 2.week Classical problem: There is a pair of rabbits. From the third month after birth, a pair of rabbits will be born every month, and the little rabbit will give birth to a pair of rabbits every month after the third month. If the rabbits are not dead, what is the total number of rabbits each month?

C language programming> 2.week Determine how many prime numbers are between 101-200, and output all prime numbers.

C language programming> 2.week Enter a line of characters, and count the number of English letters, spaces, numbers and other characters.

C language programming> 2.week A ball falls freely from a height of 100 meters, and rebounds back to half of its original height each time it hits the ground. When it falls again, how many meters does it travel when it hits the ground for the 10th time? How high is the 10th rebound?

C language programming 2.week Monkey eating peach problem: The monkey picked a few peaches on the first day, and ate half of it immediately, and was not addicted. He ate one more and ate half of the remaining peaches the next morning. , Ate one more. After that, I ate half and one of the remaining half of the previous day every morning.

C language programming The second week Two table tennis teams compete, each with three players. Team A has three persons a, b, and c, and Team B has three persons x, y, and z. Lots have been drawn to determine the list of matches. Someone asked the players for the roster of the game. a says he is not compared with x, c says he is not compared with x, z, please program to find out.

**The third week**

C language programming The third week Find the sum of 1+2!+3!+ +20!.

C language programming The third week Give a positive integer with no more than 5 digits. The requirements: 1. Find the number of digits in it. 2. Print out the digits in reverse order.

C language programming The third week A 5-digit number, judge whether it is a palindrome number. That is, 12321 is the number of palindrome, the ones place is the same as the ten thousand place, and the ten place is the same as the thousand place.

C language programming The third week Find prime numbers within 100.

C language programming The third week Sort the 10 numbers.

C language programming> third week There is an array that has been sorted. Now enter a number and require it to be inserted into the array according to the original rules.

C language programming The third week Output an array in reverse order.

C language programming The third week Print out Yang Hui triangle (10 lines are required to be printed out).

**the fourth week**

C language programming> Week 4 Learn the usage of static definition of static variables.

C language programming Fourth week Learn another usage of static.

C language programming The fourth week Learn the usage of using auto to define variables.

C language programming The fourth week Learn the usage of external.

C language programming> Week 4 Learn the method of using register to define variables.

C language programming> Fourth week Use the #define command to find the square of a number.

C language programming> Fourth week Use fillellipse to draw an ellipse.

C language programming> Fourth week Input a character from the keyboard to determine whether it is a number.

**fifth week**

C language programming> Week 5 At present, the RMB has the following denominations (excluding the sum of angles): 1 yuan, 2 yuan, 5 yuan, 10 yuan, 20 yuan, 50 yuan, 100 yuan, write a function to calculate the amount "X" how many denominations are needed for n Yuan banknotes.

C language programming The fifth week Write a program to generate 20 random numbers between 0 and 10, store these 20 random numbers in an array, and use the function to count the number of occurrences of a certain number in these random numbers .

C language programming> fifth week write a program to find m to the power of n. The m and n are input by the user, and the custom function for raising m to the power of n is called, and the calculation result is output.

C language programming> Week 5 Write a program, use a function to count the number of lowercase letters in a string of characters, the function parameter is a character array, the return value is the number of lowercase letters, received from the keyboard in the main function A string of characters, and call the statistical function to find the number of lowercase letters, and then output.

C language programming> Week 5 Write a program, input 3 numbers X, Y, Z from the keyboard, write a function to calculate the cube sum of the 3 numbers and return the calculation result.

C language programming The fifth week The multiplication table from 1 to 10 is displayed in a table format.

C language programming>The fifth week Find the number in 1-1000 that can be 7 or 11, but cannot be divisible by 7 and 11 at the same time. Every 10 is displayed on a line.

C language programming Fifth week According to inputting the grade of a certain class student, calculate the average grade of the student of the class, and the class student requires the user to input. Finally ask if you want to continue.

**Sixth week**

C language programming> Week 6 Write an input function: used to receive n integer numbers from the keyboard and store them in an integer array. Call this function in the main function to calculate the sum of these n integers.

C language programming> Week 6 The user inputs a set of data until the end of the input and press Enter, and put the data into the array. Requirement: first bubble sort the array and output the result; then prompt the user "whether to insert data", if you want to insert data, insert the inserted data into the array, and still output in order; finally find the maximum value, and Minimum value, output.

C language programming The sixth week In the postal system, the charge is stipulated in this way, when the weight of the postal package is less than 10 kg, it will be charged at 0.25 yuan per kg; if it exceeds 10 kg, the excess part will be charged at 0.34 yuan, and the rest Charged at 0.25 yuan. The user is now required to enter the weight of the postal package, please output the postage payable.

C language programming> Sixth week Regulations at the party: boys, over 18 years old can drink, no over 18 years old, drink drinks; girls, over 20 years old, can drink, no over 20 years old, drink drinks; please enter The gender of the student and the age of the student, and judge what to drink according to the input situation!

C language programming> Week 6 Peking University Jade Bird's requirements: When recommending employment, measure according to the following criteria

: 1): The number of projects is less than 5: Cannot recommend employment

2): The number of projects is less than 6 to 10 : Only small companies in Chongqing can be recommended

3): The number of projects is within 11-20: Any company in Chongqing can be recommended

4): The number of projects is more than 20: It is possible to enter foreign companies

C language programming> Week 6 Enter a string of characters, count the number of uppercase letters, and emphasize that statistics must use functions.

C language programming> Week 6 Write a program to create a structure BOOK, which is used to store book information: book title, author's name, page number and price, and accept input and output.

C language programming> Week 6 Write the program to realize the Rubik's Cube.

**Seventh week**

C language programming> Week 7. Please write a function fun, its function is: find all integers from 1 to m (including m) that can be adjusted by 7 or 11 in array b, and return these through n The number of counts.

C language programming> Week 7. Please write a function fun, its function is: find the smallest value and its subscript in a one-dimensional integer array element, the smallest value and its subscript through the formal parameters Pass back. The values in the array elements have been assigned in the main function.

C language programming> Week 7 The following program defines an N N two-dimensional array and assigns values in the main function. Please write the function fun. The function of the function is to find the average value of the surrounding elements of the array and return it to r in the main function as a function value.

C language programming> Week 7 Please write the function fun, whose function is to delete all the characters in the string pointed to by str except for the characters whose subscripts are even numbers and the ASCII values are also even numbers; the remaining characters in the string are deleted. A new string formed is placed in the array pointed to by s.

C language programming> Week 7. Please write a function void fun(int *s,int t,int* result) to find the subscript of the smallest element of the array in the array, and store it in the storage unit pointed to by result .

C language programming> Seventh week The function of the given program is to judge whether a character in the string s is the same as the character ch, if it is the same, do nothing, if it is different, it will be inserted at the end of the string.

C language programming> Week 7 The student's record is composed of student ID and grade. The data of M students has been put into the structure array score in the main function. Please write the function fun. Its function is to put the student with the lowest score The data is placed in the array pointed to by low.

C language programming> Week 7 Please edit a function void fun(int a[M][N],int b[N]), c points to a two-dimensional array with M rows and N columns, and find each column of the two-dimensional array The largest element in the middle, and put them into the one-dimensional array pointed to by b in turn.

**Eighth week**

C language programming> eighth week Please write a function void fun(char*t,int p[]), count the number of occurrences of each of the 26 letters "a" to "z" in the t string, and place them in sequence p in the index group.

C language programming week eight Write the function fun, the function of the function is: calculate according to the following formula, and the result of the calculation is returned as the value of the function.

C language programming week eight Please write a function void fun(char orig[],char result[],int flg), its function is: delete the character of a specified subscript in a string Among them, orig points to the original string, the deleted string is stored in the array pointed to by result, and the specified subscript is stored in flg.

C language programming> Week 8 Please write a function fun, its function is: calculate and output the sum of all factors (not including 1 and itself) of a given integer n. It is stipulated that the value of n is not greater than 1000.

C language programming> week eight Please write the function fun, its function is: find the smallest number greater than a (a>3) in the Fibonacci sequence, and the result is returned by the function. The definition of Fibonacci sequence F(n) is:

F(0)=0,f(1)=1

F(n)=F(m-1)+F(m-2)

C language programming> eighth week Write the function fun, its function is to calculate and output the sum of the following series:

C language programming> Week 8 Write the function fun, its function is: According to the following formula, the result is returned by the function value. m and n are two positive integers and m>n is required.

C language programming> eighth week Write a program to realize the transposition of the matrix (3 rows and 3 columns) (ie exchange of rows and columns).

**Ninth week**

C language programming> ninth week The following program defines an N N two-dimensional array and assigns it automatically in the main function. Please write the function fun(int b[][N]). The function of this function is to set all the values of the lower left half of the array to 0.

C language programming> Week 9 Please write a function unsigned (unsigned n), n is an unsigned integer greater than 10, if n is an integer with m (m 2) bits, the function will find the last m- of n The 1-digit number is returned as a function value.

C language programming> Week 9 Please write a function fun(char*str) The function of this function is to reverse the contents of the string.

C language programming> Week 9 Write the function fun, its function is: use the simple iterative method shown below to find a real root of the equation cos(y)-y=0. yn+1=cos(yn)

C language programming> Week 9 Please write a function fun, its function is: according to the following formula to find the value of (requires to meet the accuracy of 0.0005, that is, stop the iteration when a term is less than 0.0005):

C language programming> Week 9 Please write a function fun, its function is: convert all the letters in the odd position in the string pointed to by s to lowercase (if the position is upper and lower letters, then no conversion) .

C language programming> Week 9 Please write a function fun, its function is: find the value of the smallest element in a 2 M integer two-dimensional array, and return the smallest value to the calling function.

C language programming> Week 9 Please write the function fun, whose function is to combine two two-digit positive integers x and y into one integer and place it in z. The method of merging is to place the tens and ones of x on the thousands and tens of z in turn, and place the tens and ones of y on the hundreds and ones of z in turn.

**Tenth week**

C language programming> week ten Please write the function fun. Its function is to delete the characters whose subscript is even and the ASCII value is odd in the string pointed to by str. The new string formed by the remaining characters in str is placed in s. Refers to the array.

C language programming> Tenth week Write the function fun, its function is: find the square root a of the sum of all natural numbers within m (not including m) that can be divisible by 3 and 7 at the same time, and return it as the function value.

C language programming> week ten Please write the function fun, whose function is to delete the characters with odd ASCII values in the string pointed to by str, and the remaining characters in the string form a new string and place them in the array pointed to by s.

C language programming> week ten Please write the function fun. Its function is to combine two two-digit positive integers x and y into one integer and place it in z. The method of merging is to place the tens and ones of x on the hundreds and ones of z, and place the tens and ones of y on the tens and thousands of z in turn.

C language programming> Week 10 The student's record is composed of student ID and grade. The data of M students has been put into the structure array stu in the main function. Please write the function fun. Its function is: the function returns the specified study Number of student data, the designated student number is input in the main function.

C language programming The tenth week Please write the function fun, whose function is to calculate and output the value of the following polynomials: Fn =1+1/1!+1/2!+1/3!+1/4!+ + 1/m!

C language programming> Tenth week Please write the function fun. The function of this function is to count the number of words in a line of string and return it as a function value. A line of character string is entered in the main function. It is stipulated that all words are composed of lowercase letters, and the words are separated by a number of spaces. There are no spaces at the beginning and end of a line.

C language programming> Tenth week Please write the function fun, its function is: Combine two two-digit positive integers x and y into one integer and place it in z. The way of merging is to place the tens and ones of x on the tens and thousands of z in turn, and place the tens and ones of y on the hundreds and ones of z in turn.

**Week 11**

C language programming> Eleventh week Please write the function fun, its function is: delete the even-numbered characters in the string pointed to by str, and put the new string formed by the remaining characters in the string in the index group of s.

C language programming> week eleven The scores of N students have been put into a linked list structure with a head node in the main function, and a points to the head node of the linked list. Please write the function fun. Its function is to find out the student's highest score and return it by the function.

C language programming> Eleventh week Assume that the input string contains only letters and "#" signs. Please write the function fun. Its function is to move all the leading "#" signs in the string to the end of the string.

C language programming> Eleventh week Please write the function fun, the function of this function is: to judge whether the string is a palindrome? If so, the function returns 1, and the main function outputs YES, otherwise it returns 0, and the main function outputs NO. A palindrome is a string that reads both forward and backward.

C language programming> Eleventh week Please write a function to delete all spaces in the string.

C language programming> Eleventh week A student's record is composed of student ID, 5 course grades and average score. The student ID and 5 course grades have been given in the main function. Please write the function fun. Its function is to find the average score of the student and put it in the ave member of the record.

C language programming> Eleventh week Please write the function fun, its function is: find the number of specified characters in the string pointed to by str, and return this value.

C language programming> Eleventh week Please write the function fun, the function of this function is to move the contents of a one-dimensional array: If there are m integers in the array, the subscript is required to be changed from 0 to t(t m-1 ) Array elements are shifted to the end of the array.

**Twelfth week**

C language programming The twelfth week Please write the function fun. The function of this function is to move the content in the string. The moving rules are as follows: translate the first to nth characters to the end of the string, and move the first to nth characters to the end of the string. The characters from n+1 to the end are moved to the front of the string.

C language programming The twelfth week Please write the function fun. Its function is to delete all the characters in the string pointed to by str except for the characters with odd numbers and odd ASCII values. A new string formed by the remaining characters is placed in the array pointed to by s.

C language programming The twelfth week It is known that the student's record is composed of student number and academic record, and the data of M students has been stored in the a structure array. Please write the function fun. The function of this function is to find the record of the student with the highest grade and return to the main function through formal parameters.

C language programming> Week 12 Please write the function fun. The function of this function is to realize D=B+B , that is, to transpose the matrix B plus B and store it in the matrix D. The calculation result is output in the main function.

C language programming The twelfth week Assume that the input string contains only letters and the'#' sign. Please write the function fun. Its function is to make the number of'#' at the end of the string not more than m number of'#', if there are more than m, then delete the extra "#"; if it is less than or equal to m, do nothing, and the'#' in the middle and in front of the string will not be deleted.

C language programming The twelfth week The student's record is composed of student number and grade. The data of M students has been put into the structure array student in the main function. Please write the function fun. Its function is: The average score of the student data is placed in the array pointed to by c, the number of students above the average score is returned through the formal parameter n, and the average score is returned through the function value.

C language programming> Twelfth week Assume that the input string contains only letters and "#" signs. Please write the function fun. Its function is to delete all the other "#" signs in the string except for the "#" sign at the end. The formal parameter p already points to the last letter in the string.

C language programming The twelfth week The student's record consists of student ID and grade. The data of M students has been put into the structure array STU in the main function. Please write the function fun. Its function is to specify the range of scores. The student data in is placed in the array pointed to by q, and the number of students in the specified score range is returned by the function value.

**Thirteenth week**

C language programming> thirteenth week Please write the function fun, the function of this function is: delete all the same numbers in a one-dimensional array, so that there is only one left. The numbers in the array have been arranged in ascending order, and the function returns the number of data in the array after deletion.

C language programming> thirteenth week Please write the function fun, the function of this function is: to put M strings in the string array (the length of each string does not exceed N), and merge them in order to form a new character string.

C language programming> thirteenth week Write a function fun, its function is: to achieve the connection of two characters (do not use the library function strcat), that is, connect the string pointed to by str2 to the string pointed to by str1 .

C language programming> thirteenth week Assume that the input string contains only letters and "#" signs. Please write the function fun. Its function is to delete all other "#" signs in the string except for the leading and trailing "#" signs.

C language programming The thirteenth week The student record is composed of students and grades. The data of M students has been put into the structure array stu in the main function. Please write the function fun. Its function is: put the highest score Student data is placed in the array pointed to by high.

C language programming> thirteenth week Please write the function fun, its function is: calculate and output the value of the following polynomial when x<0.97, until |Fn-Fn-1|<0.000001.

C language programming> thirteenth week Please write the function fun, its function is: delete the even-numbered characters in the string pointed to by str. The remaining characters in the string form a new string into the array pointed to by s.

C language programming> thirteenth week It is known that the records of students are composed of student numbers and academic records, and the data of M students have been stored in the stu structure array. Please write the function fun, the function of this function is:

**Fourteenth week**

C language programming> fourteenth week Please write the function fun. Its function is to store all non-prime numbers greater than 1 and less than the integer n into the exponent group of a, and the number of non-prime numbers is returned through m.

C language programming> fourteenth week Assuming that the input string contains only letters and "#" signs, please write the function fun. Its function is to delete all the "#" signs at the end of the string, and the front and middle ones The "#" sign is not deleted.

C language programming> fourteenth week Please add the fun function, the function of this function is: press "0" to "9" to count the number of occurrences of the odd number characters in a string, and the result is stored in the array num. Note: You cannot use string library functions.

C language programming> fourteenth week The scores of M students have been put into a linked list structure with a head node in the main function, and a points to the head node of the linked list. Please write the function fun. Its function is to find the average score and return it by the function value.

C language programming> Fourteenth week Please write the function fun, whose function is to combine two two-digit positive integers x and y into one integer and place it in z. The method of merging is to place the tens and ones digits of x on the ones and hundreds of z in turn, and place the tens and ones digits of y on the tens and thousands of z in turn.

C language programming> Fourteenth week Please write the function fun. Its function is to combine two two-digit positive integers a and b into one integer and place it in c. The method of merging is to place the tens and ones of a on the hundreds and ones of c, and place the tens and ones of b on the thousands and tens of c.

C language programming> Fourteenth week Please write a function fun, its function is: calculate the average score of n courses, the calculation result is returned as the function value.

C language programming> Fourteenth week The student's record is composed of student ID and grade. The data of M students has been put into the structure array stu in the main function. Please write the function fun. Its function is: put less than or equal to The average score of the student data is placed in the array pointed to by 1, the number of students greater than or equal to the average score is returned through the formal parameter n, and the average score is returned through the function value.

**Fifteenth week**

C language programming The fifteenth week Please write the function fun, whose function is to calculate and output the following polynomial values:

C language programming The fifteenth week Please write the function fun, its function is to calculate: F=, F is returned as a function value. In C language, log(n) function can be called to find In(n). The reference description of log function is:

C language programming> Week 15 Please write the function fun. The function of this function is to put the character data in a two-dimensional array of M rows and N columns into a string in the order of columns.

C language programming> Week 15 Write a function to find the shortest string from the num strings passed in, and return the string address (use "*" as a sign to end the input).

C language programming The fifteenth week Assuming that the input string contains only letters and "#" signs, please write the function fun. Its function is: In addition to the leading "#" signs in the string, the other characters in the string All "#" signs are deleted.

C language programming> Week 15 Write a function that can count the number of occurrences of a string of length 3 in another string.

C language programming The fifteenth week Write a function to find the shortest string from the num strings passed in, and return the string address (use "*" as a sign to end the input).

C language programming>The fifteenth week Please write the function fun, its function is: Calculate and output the sum of the square roots of all prime numbers between 3 and m.

**Week sixteen**

C language programming The sixteenth week The function of the given program is to find 1/4 of the circumference. The function obtains the diameter of the circle through the formal parameters, and the function returns 1/4 of the circumference (the circumference formula is: L= d, the variable name defined in the program must be the same as the formula variable).

C language programming> Week 16 The function of the function fun is to count the number of times the numbers 5, 6, and 7 appear on each of the long integer test, and return to the main function through the external (global) variables sum5, sum6, and sum7.

C language programming> week sixteen Please add the main function, the function of this function is: input a set of integers from the keyboard, and use conditional expressions to find the largest integer. It ends when the entered integer is -1.

C language programming> Week 16 Please add the fun function. The function of this function is to change all the lowercase letters in the string str to the corresponding uppercase letters, and the other characters remain unchanged.

C language programming> Week 16 Please add the fun function. The function of this function is to take out all the uppercase letters in the string in turn to form a new string and replace the original string.

C language programming> week sixteen In the following given program, the function of the function fun is to realize the exchange of the values of two variables in a certain way, and it is stipulated that it is not allowed to add sentences or expressions.

C language programming The sixteenth week s is a string composed of all lowercase alphabetic characters and space characters. The length of the string is passed in by len. Please add the fun function. The function of this function is: statistics in the string s The number of words, the result is returned by the variable len.

C language programming> Sixteenth week S is a string composed of numbers and letters, and the length of the string is passed in by the variable len. Please add the fun function. The function of this function is to convert the numeric characters in the string s into numbers and store them in the integer array a. The function returns the length of the array a.

**Seventeenth week**

C language programming> Week 17 Please add the main function. The function of this function is to take out all the numeric characters from the string s and count them separately, save the result in the array a and output, and save the other characters in a [10] In.

C language programming The seventeenth week In the following given program, the function of the function fun is: from the string pointed to by str, find out the number of substring pointed by s and return it as the function value.

C language programming> Week 17 Please add the fun function, the function of this function is: first store the strings in the string str in the reverse order in t, and then connect the characters in str to the t in the correct order Behind.

C language programming> week seventeen In the following given program, the function of the function fun is to add n "*" signs at the forefront of the string to form a new string and overwrite the original string.

C language programming> Week 17 Please add the fun function. The function of this function is to find the subscript of the smallest element of the array in the array and store it in the storage unit pointed to by k.

C language programming> week seventeen In the following given program, the function of the function fun is to find the greatest common divisor of two non-zero positive integers and return it as a function value.

C language programming> Seventeenth week The array a[N] stores a set of 3-digit non-conforming positive integers, and the number of its elements is passed to the fun function through the variable len. Please add the fun function. The function of this function is to find all non-conforming integers with equal ones and hundred digits from the array a. The result is stored in the array yy, and the number is returned by the fun function.

C language programming> Seventeenth week In the following given program, the function of the function fun is to compare the characters in the corresponding positions of the two strings x and y one by one, and store the characters with equal or smaller ASCII values in the z array in sequence To form a new string.

**Week eighteen**

C language programming The eighteenth week In the given program below, the function of the function fun is: convert the letters in the string pointed to by str into subsequent letters in alphabetical sequence (Z converts A, z converts to a), Other characters remain unchanged.

C language programming The eighteenth week In the following given program. The function of the fun function is to change the last letter of each word in the string pointed to by q to uppercase ("word" here refers to a string separated by spaces).

C language programming The eighteenth week In the following given program, the function of the function fun is: Find the least common multiple of three numbers.

C language programming> eighteenth week In the following given program, the function of the function fun is to take out all the alphabetic characters in the string in turn to form a new string and replace the original string.

C language programming> the eighteenth week The following given program is to establish a singly linked list of leading nodes, and use random functions to assign values to each node. The function of the function fun is to accumulate the even-numbered values of the singly linked list node (excluding the head node) and return it as a function value.

C language programming> eighteenth week Please add the main function. The function of this function is to copy the non-space characters in the string str1 to the string str2.

C language programming> eighteenth week In the following given program, the function of the function fun is: put the characters in the odd position in the string str or the characters with the even number in the ASCII code into the string s in sequence.

C language programming> eighteenth week In a given program, the function of the function fun is to arrange the three elements in the structure array pointed to by the formal parameter pointer in ascending order according to the num member.

**Week nineteen**

C language programming> the nineteenth week In the following given program, the function of the function fun is: replace all the substrings pointed to by temp1 appearing in the string pointed to by str with the substring pointed to by temp2 to form a new string Put it in the array pointed to by result.

C language programming The nineteenth week Please add a function. The function of this function is to find the average value of a one-dimensional array a[N], and round the result to retain two decimal places.

C language programming The nineteenth week Please add the main function. The function of this function is to calculate the average score of the four students in each subject.

C language programming> the nineteenth week In the following given program, the function of the function fun is: to achieve the exchange of two integers.

C language programming> the nineteenth week Please add the main function. The function of this function is to output an N N matrix, requiring the value of 1 for non-diagonal elements and 0 for diagonal elements.

C language programming> the nineteenth week The function of the function fun in the following given program is to take out the even-digit number in the long integer variable x from the low bit, and form a new number in turn and place it in y.

C language programming> nineteenth week In a given program, the function of the function fun is to return the data of the youngest person in the structure array pointed to by the formal parameter student as the function value and output it in the main function.

C language programming> nineteenth week In the following given program, the function of the function fun is: replace the last occurrence of the substring pointed to by s1 in the string pointed to by s with the substring pointed by s2 to form a new string Put it in the data pointed to by str.

**Week 20**

C language programming 20th week Please add the main function, the function of this function is to find the sum of 1+2!+3!+ +N!.

C language programming 20th week In the following given program, the function of the function fun is: find the largest number and the second largest number in the array, and swap the largest number with the number in b[0], the second largest number and Swap the numbers in b[1].

C language programming> 20th week Please add the fun function. The function of this function is to arrange the characters in the string s in ascending order of the ASCII code of the characters, and the processed string is still stored in the original string. The length is passed in as a function parameter.

C language programming> 20th week In the following given program, the function of the function fun is to find the longest character string from N character strings and return its address as the function value. Each string is input in the main function and put into a string array.

C language programming> 20th week Please add the main function, the function of this function is: if the previous element of the array a is larger than the next element, it will be saved in the array b and output.

C language programming> 20th week Please add the main function. The function of this function is to print out all the three digits that satisfy the numbers in the ones place, the numbers in the tens place, and the numbers in the hundreds place.

C language programming> 20th week Please add the fun function, the function of this function is to put the odd-numbered elements in the array a behind the original array in the original order.

C language programming> 20th week In the following given program, the function of the function fun is to connect n (1 n 10) strings to form a new string and place it in the string pointed to by s.

**Twenty-first week**

C language programming> twenty-first week In the following given program, the function of the function fun is to compare two character strings and return the first address of the long character string as the function value.

C language programming> twenty-first week Please add the main function. The function of this function is to invert the elements in the one-dimensional array, and the result is still stored in the original array.

C language programming> twenty-first week In the following given program, the function of the function fun is to find two prime numbers for an even number, the sum of these two prime numbers is equal to the even number, and pass these two prime numbers through the formal parameters The pointer is passed back to the main function.

C language programming> twenty-first week Please add the main function. The function of this function is to print out all the numbers from 1 to 99 that satisfy the square of the single digit equal to itself.

C language programming> Twenty-first week In the following given program, the function of the function fun is: use the bubble method to sort the 5 strings in ascending order.

C language programming> 21st week Please add the main function, the function of this function is: input a string from the keyboard, that is, a designation, and then delete this character and all the characters after it, the result is still stored in the original string in.

C language programming> twenty-first week In the following given program, the function of the function fun is: first store the characters in the string pointed to by y in reverse order, and then store the characters in the string pointed to by x and the characters pointed to by y The characters in the string are cross-merged into the index group of z in sorted order, and the remaining characters that are too long are connected to the end of the index group of z.

C language programming> twenty-first week Please add the main function, the function of this function is: output a set of positive integer solutions of the equation group a+b=52, a+2b=60 The result of this question is a=44, b=8.

**Twenty-second week**

C language programming> 22nd week In the following given program, the function of the function fun is to find a prime number greater than a given integer n and immediately following n, and return it as a function value.

C language programming> 22nd week Please add the fun function. The function of this function is to return the number of specified characters in the character array, and the specified characters are input from the keyboard.

C language programming> 22nd week In the given program below, the function of the function fun is to calculate the value of the following formula based on the integer parameter n:

C language programming> 22nd week Input a group of lowercase letters from the keyboard and save them in the character array str. Please add the fun function. The function of this function is to convert the subscripts of the characters in the character array str to even lowercase letters. Into the corresponding uppercase letter, and the result is still stored in the original array.

C language programming> 22nd week In the following given program, the function of the function fun is to copy all the characters in the string p to the string a, and insert a space after every three characters copied.

C language programming> 22nd week Please add the fun function. The function of this function is to delete the characters whose subscripts can be divisible by 2 and 3 from the string s, and save the remaining characters in the string again. s.

C language programming> 22nd week The function of the function fun in the following given program is to take out the odd-digit numbers in the long integer variable a from the low order, and form a new number in turn and place it in b.

C language programming> 22nd week Please add the fun function. The function of this function is to find a natural number within 100 (not including 100) that can be divisible by 2 or 3, but cannot be divisible by 2 and 3 at the same time. The result is stored in the array a, and the fun function returns the number of elements in the array a.

**Twenty-third week**

C language programming> Twenty-third week In the following given program, the function of the function fun is: find n! (n<20), and the value of the factorial sought is returned as the function value. For example, if n=5, 120 should be output.

C language programming> twenty-third week Please add the fun function. The function of this function is to swap the positions of the largest and smallest elements in the array a, and the result is stored in the original array again, and the positions of other elements remain unchanged. Note that there are no identical elements in the array a.

C language programming> Twenty-third week In the following given program, the function of the function fun is to sort the characters in the string from small to large using the insertion sort method. The basic algorithm of the insertion method is: first sort the first two elements in the string; then insert the third character into the first two characters, and the first three characters are still in order after insertion; then insert the fourth character To the first three characters... the string to be sorted has been assigned in the main function.

C language programming> twenty-third week Please add the fun function. The function of this function is to delete characters smaller than the specified character in the character array, and the specified character is input from the keyboard, and the result is still stored in the original array.

C language programming> Twenty-third week Please add the main function. The function of this function is to find the average value of all prime numbers within 1 100 (not including 100).

C language programming> twenty-third week The function of the function fun in the following given program is to delete all blank characters in the string s (including Tab characters, carriage returns and line feeds). When entering a character string, use "#" to end the input.

C language programming> Twenty-third week Please add the main function, the function of this function is: ask for n!.

C language programming> twenty-third week In the following given program, the function of the function fun is to count the number of digits that do not match the value of 0 in an integer, pass it back to the main function through formal parameters, and put the integer The largest numeric value on each bit is returned as the function value.

**Week 24**

C language programming> 24th week Please add fun function, the function of this function is to judge whether a number is prime. When the number is a prime number, the function returns the string "yes!", otherwise the function returns the string "no!" and outputs it in the main function.

C language programming> 24th week The function of the function fun in the following given program is: first store the characters in the string str in the s string in reverse order, and then connect the characters in str to s in the positive order The back of the string.

C language programming> 24th week The function of the given program is to perform segmentation statistics of m individual test scores, the test scores are placed in the score array, and the number of people in each segment is stored in the a array:

C language programming> Twenty-fourth week In the following given program, the function of the function fun is: Given n real numbers, output the average value, and count the number of real numbers above the average value (including the average value).

C language programming> twenty-fourth week s is a character sequence, please add fun function, the function of this function is to find the element with value a in s, return the number of elements found with value a, and put these values The subscripts of the elements of a are sequentially stored in the array str.

C language programming> Twenty-fourth week In the following given program, the function of the function fun is: use a recursive algorithm to calculate the value of the nth item in the Fibonacci series. Starting from item 1, the Fibonacci series sequence is 1, 1, 2, 3, 5, 8,...

C language programming> twenty-fourth week In a given program, the function of the function fun is to move all the non-numeric characters in the string pointed to by s after all the numeric characters, and keep the original numeric and non-numeric strings. Some precedence.

C language programming> Twenty-fourth week In the following given program, the function of the function fun is to calculate and output the sum of the largest 10 prime numbers within max. High is passed from the main function to the fun function.

**Twenty-fifth week**

C language programming> Twenty-fifth week In a given program, the function of the function fun is to insert a "*" after each non-digit character in the string pointed to by the formal parameter s.

C language programming> Twenty-fifth week In the following program, the function of the function fun is to convert uppercase letters to the fifth letter after the corresponding lowercase letters. If it is a lowercase letter, the value of the lowercase letter is reduced from v z. 21. The converted lowercase letters are returned as the function value.

C language programming> Twenty-fifth week In the following given program, the function of the function fun is to judge whether a triangle can be formed according to the inputted three side lengths (integer values); whether it constitutes an equilateral triangle or waits Waist triangle. If it can form an equilateral triangle function, it returns 3, if it can form an isosceles triangle function, it returns 2, if it can form a triangle function, it returns 1, and if it can t form a triangle function, it returns 0.

C language programming> twenty-fifth week Please add the fun function, the function of this function is to find the number that can divide k and is an even number, save these numbers in the array a, and output from largest to smallest.

C language programming> Twenty-fifth week The function of the following given program is: read in an English text line, change the first letter of each word in it to uppercase, and then output this text line (here "word" Refers to a string separated by spaces).

C language programming> twenty-fifth week Please add the function fun. The function of this function is to count the number of prime numbers less than or equal to x (x> 2), and the number of prime numbers is returned as the function value.

C language programming> Twenty-fifth week The function of the function fun in the following given program is: calculate m!.

C language programming> Twenty-fifth week The function of the function fun in the following given program is to take out the even number in each digit of the long integer in turn, and form a new number and place it in b. The high position is still high, and the low position is still low.

**Week 26**

C language programming> Twenty-sixth week The function of the function fun is to swap the values of the first half of the elements in the exponent group of the formal parameter b with the values of the second half of the elements. The number of data in the array is stored in the formal parameter n. If n is an odd number, the middle element does not move.

C language programming> twenty-sixth week The function of the function fun in the following given program is to output the contents of the string in reverse order, but does not change the contents of the string.

C language programming 26th week Please add fun function, the function of this function is to judge whether the sum of the ones digit and hundreds digit of a number is equal to the tens digit, if yes, it will return "yes!", Otherwise, it returns "no!".

C language programming> 26th week Please add the main function, the function of this function is: input a string from the keyboard and save it in the character s1, and save the odd-numbered characters in the string s1 in the string s2 In and output.

C language programming> Twenty-sixth week In the main function, input a number of numbers from the keyboard and put them into the array, and end the input with 0 and put them in the last element. In the following given program, the function of the function fun is to calculate the average value of the positive numbers in the array elements (excluding 0).

C language programming> 26th week Please add the fun function, the function of this function is: press "0" to "9" to count the number of occurrences of odd number characters in a string, and save the result in the array num.

C language programming> Twenty-sixth week In the following given program, the function of the function fun is to delete all lowercase letters "c" from the string s.

C language programming>26th week Please add the fun function. The function of this function is to add num "*" signs at the forefront of the string to form a new string and overwrite the original string.

**28th week**

C language programming> twenty-seventh week Please add the fun function, the function of this function is to find all prime numbers between two integers (including these two integers), save the result in the array a, the function returns the prime number Number.

C language programming> twenty-seventh week The function of the function fun in the following given program is: pass in an integer n, and calculate the value of the following formula:

C language programming> twenty-seventh week Please add fun function, the function of this function is to calculate and output the value of the following polynomial:

C language programming> twenty-seventh week The function of the function fun in the following given program is: output a square matrix with N rows and N columns, and then find the sum of the elements on the two diagonals, and return the sum.

C language programming> twenty-seventh week Please add the main function. The function of this function is to output an N N matrix, requiring the value of 0 for surrounding elements and 1 for non-peripheral elements.

C language programming> twenty-seventh week In the following given program, the function of fun is to convert a positive integer n in decimal to i (2 i 9) hexadecimal number, and output by bit.

C language programming> twenty-seventh week Please add the main function. The function of this function is to copy the largest character of each line of a two-dimensional character array to the character array str.

C language programming> Twenty-seventh week In the following given program, the function of the function fun is: put the largest of the three numbers entered in the main function in x and the smallest in z.

** to be continued& **

**The harder, the more fortunate!**

Come on, Aoli give it! ! !