// C Exercises Collection
01. Write a program that prints "Hello world!" message on screen.
02. Write a program that asks for 2 numbers to the user and show its product. Try
different arithmetic operations.
03. Write a program that asks for 2 numbers to the user and determinate the greater
one. Take care of side possibilities (equal numbers).
04. Write a program that asks for 3 numbers to the user and determinate the greater
one. Take care of side possibilities (equal numbers).
05. Write a program that asks for radius of a circle and find its diameter,
circumference and area.
06. Write a program that asks for a value in centimeter and convert it into meter and
kilometer.
07. Write a program that asks for a temperature in Celsius(°C) and convert it into
Fahrenheit(°F).
08. Write a program that asks for 1 number to the user and show its multiply table.
09. Write a program that asks for seconds and convert it into minutes, hours and days
10. Write a program that asks for 2 angles of a triangle and find the third angle.
11. Write a program that asks for 2 numbers to the user and show product by sums. Use
while loop.
12. Write a program that asks for 10 numbers to the user and show the sum and product
of all of them. Use while loop.
13. Write a program that asks for a sequence of numbers to the user and show the sum
of all of them. Process stops when a negative number is introduced.
14. Write a program that asks for a sequence of numbers to the user and show the mean
of all of them. Process stops only when number 0 is introduced.
15. Write a program that asks for 1 number to the user and show its binary equivalent
value. You can show the binary in inverted order.
16. Write a program that that displays the first 100 prime numbers.(OPCIONAL)
17. Write a program that prints five random numbers, like a Lottery.
18. Write a function to check if an integer is negative. Function declaration should
be: int IsNegative(int num);
19. Write a function to calculate power of a value. Function declaration should be:
int RaiseToPower(int value, int power);
20. Write a calculator program. Program flow should be as follow:
1) Ask for a number (float)
2) Ask for desired operation: '+', '-', '*', '/'
3) Ask for another number (float)
4) Show operation and results
5) Go to step 2)
REMEMBER:
• Programs must compile and work.
• Programs must be perfectly tabulated and spaced.
• Programs should include comments (recommended).
• Programs must show screen results organized and styled.