C Program to Find the Area of a Circle Given the Radius

The area of a circle is A = π r² and the circumference is C = 2πr, where r is the radius. This program computes both from a user-supplied radius. Key points: use radius * radius instead of pow(radius, 2) (no need for the math library for a simple square), define π as a high-precision …

Numbers Divisible by 7 in C – List, Count, and Sum

Finding all integers in a range that are divisible by a given number is a classic loop exercise. The key tool is the modulo operator % — if i % 7 == 0, then i is exactly divisible by 7 with no remainder. This post shows two programs: one for the classic 100–200 range, and …

C Program to Find the Sum of Even and Odd Numbers

Given a list of integers, separate them into two groups — even numbers (divisible by 2) and odd numbers (not divisible by 2) — and report the sum and count of each group. This is a classic array-scanning problem that demonstrates the modulo operator, accumulator variables, and loop-based input. The original post had no code; …

C Program to find the squares and cubes of a two digit odd number.

This C program prints the square and cube of every two-digit odd number — that is, the odd numbers from 11 to 99. A number is odd if it is not divisible by 2 (n % 2 != 0). Two-digit odd numbers begin at 11 (the smallest two-digit odd) and end at 99. The original …

C Program to accept two integers for a co-ordinate point and determine its Quadrant.

The Cartesian coordinate plane is divided into four quadrants by the X and Y axes. Given a point (x, y), this program determines which quadrant it lies in — or whether it falls on an axis or at the origin. The logic is a direct translation of the mathematical definitions into C’s if-else chain. Region …