Professional Documents
Culture Documents
20 Exercise Questions For C Programming2
20 Exercise Questions For C Programming2
1. Enter two numbers A and B. Please exchange their values and output
them.
2. Input two numbers A and B., please output which is small and which
3. Judge the prime numbers between 101 and 200 and output them.
"Narcissus Number".
6. Enter the student's score, if the score >= 90, output the grade in A,
divisor.
multiple.
11. A ball falls freely from a height of 100 meters. After each landing, it
bounces half of its original height and then falls. How many meters
obtained by input.
15. There is a sequence: 2/1, 3/2, 5/3, 8/5, 13/8, 21/13... Find the sum of
17. Input 10 numbers find out the maximum, minimum, average and
output.
18. Enter 10 numbers and output them in reverse order. For example,
20.Input a number m, and then print out all prime numbers which are
less than m (Please use pointer and function to solve this question).