100 Basic Math Programs in C
Basic Arithmetic
1. Add two numbers
2. Subtract two numbers
3. Multiply two numbers
4. Divide two numbers
5. Find remainder
6. Find average of 3 numbers
7. Check even or odd
8. Swap two numbers
9. Find square of a number
10. Find cube of a number
11. Add N numbers using loop
12. Subtract N numbers
13. Multiply N numbers
14. Print multiplication table
15. Find sum of digits
16. Reverse a number
17. Count digits
18. Find smallest of two
19. Find largest of two
20. Find largest of three
Algebra & Equations
1. Solve ax + b = 0
2. Solve quadratic equation
3. Expand (a + b)^2
4. Expand (a - b)^2
5. Expand (a + b)(a - b)
6. Find square root
7. Use pow() function
8. Solve simultaneous equations
9. Check type of roots
10. Evaluate expression using BODMAS
11. Calculate x^2 + y^2
12. Simplify expression
13. Evaluate 3x^2 + 2x + 5
14. Solve x/2 = 7
15. Solve 2x - 3 = 5
16. Evaluate a^2 - b^2
17. Convert binary to decimal
18. Convert decimal to binary
19. Convert decimal to octal
20. Convert decimal to hexadecimal
Number Theory
1. Check prime number
2. Print primes in range
3. Find GCD/HCF
4. Find LCM
5. Check palindrome
6. Check Armstrong
7. Check perfect number
8. Find factorial
9. Print Fibonacci series
10. Check strong number
11. Print factors
12. Count primes
13. Sum of primes
14. Count divisors
15. Sum of first N odd numbers
16. Sum of first N even numbers
17. Check co-prime
18. Print tables (1 to N)
19. Find cube root
20. Reverse digits
Geometry & Mensuration
1. Area of square
2. Perimeter of square
3. Area of rectangle
4. Perimeter of rectangle
5. Area of triangle
6. Perimeter of triangle
7. Check valid triangle
8. Area of equilateral triangle
9. Area of circle
10. Circumference of circle
11. Volume of cube
12. Surface area of cube
13. Volume of cuboid
14. Surface area of cuboid
15. Volume of cylinder
16. Surface area of cylinder
17. Volume of cone
18. Surface area of cone
19. Volume of sphere
20. Surface area of sphere
Commercial Math & Percentages
1. Find percentage
2. Increase by percentage
3. Decrease by percentage
4. Simple interest
5. Compound interest
6. Calculate EMI
7. Fraction to percentage
8. Decimal to percentage
9. Percentage to decimal
10. Percentage to fraction
11. Discount and selling price
12. Profit or loss
13. Profit/loss percentage
14. Rupees to paise
15. Minutes to seconds
16. Hours to minutes
17. Average of N numbers
18. Solve ratio and proportion
19. Speed = Distance / Time
20. Distance = Speed × Time