Joke Collection Website - Cold jokes - C language programming
C language programming
# include & ltstdio.h & gt
int? EatCorn(int? God)? //? Recursively ask the bear to eat corn
{
If (days == 1)
Return? 1;
Or what? return((eat corn(days- 1)+ 1)* 2); ? //? The bear eats more than half of the day before every day.
}
Invalid? Major (invalid)
{
printf("%d\n ",eat corn( 10));
}
//? Diamond problem
# include & ltstdio.h & gt
Invalid? Major (invalid)
{
For what? (int? I = 0; I < = 6; i++)? //? Number of control lines, ***7 lines
{
What if? (Me<4)? //? Control the first four lines
{
For what? (int? j = 0; j & lt= 2-I; j++)
? printf("%s ","?" ); ? //? Control the left clearance
For what? (int? m = 0; m & lt= I * 2; m++)
? printf(" * ");
printf(" \ n ");
}
Or what? //? Control the last three lines
{
? For what? (int? v = 4; v & lt= I; v++)
? printf("%s ","?" );
? for(int? n = 0; n & lt= 12-2 * I; n++)? //? The principle is to subtract 2 after line 5 (inclusive)
? printf(" * ");
? printf(" \ n ");
}
}
}
//? Special explanation of principle:
//? When i=4, then 12-2*4=4 (don't misunderstand that there are 4 asterisks, but 5 asterisks, and the subscripts start from 0, and the same is true below).
//? When i=5, then 12-2*5=2.
//? When i=6, then 12-2*6=0 1, and the program menu is very simple. Mainly to investigate the ASCII code, we only need to convert char into ASCII code and judge whether it is a number of 1-6. If not, return or give an appropriate prompt. In this respect, writing code is too simple.
1), 2) and 3) don't understand the meaning of the question.
- Previous article:What are the advantages of a ten-year-old child sleeping with his parents?
- Next article:I dreamed that my friend was eaten by a shark.
- Related articles
- A brief introduction to princess Wuyang's life. What is the tragedy of Princess Wuyang?
- Idioms describing interesting words
- What does home isolation mean? Do families have to be isolated?
- Who is in charge of my youth? Who did Gao Qi end up with?
- I need a play urgently. It's funny. The number of actors is 8, either in Chinese or English.
- What do you mean by school flower, school grass and so on?
- Jokes about scientists
- What are some wonderful anecdotes that will make you laugh no matter what your mood?
- The whole process was led by Tang Monk and assisted by his disciples. Tang Seng said more than once in the movie that he needed to touch up his makeup. This clearly told the audience that they had bee
- A homophonic humorous sentence of apologizing to his girlfriend