An iron rod when cut into pieces each of 30 cm length, a piece of 7 cm is left out. However, if each piece is of 28 cm length, a piece of 5 cm is left out. What is the length of the shortest such rod?

To find the length of the shortest rod, we need to find the common factor between the given lengths of 30 cm and 28 cm.

Let's start by finding the least common multiple (LCM) of 30 and 28.

The LCM of two numbers is the smallest multiple that is divisible by both numbers.

The prime factors of 30 are 2, 3, and 5.
The prime factors of 28 are 2 and 7.

To find the LCM, we take the highest power of each prime factor that appears in either number:

2^1 × 3^1 × 5^1 × 7^1 = 2 × 3 × 5 × 7 = 210

Therefore, the LCM of 30 and 28 is 210.

Now, we know that when the rod is cut into pieces of 30 cm each, there is a piece of 7 cm left out. This means the length of the rod is a multiple of 30 cm plus 7 cm.

Let's represent the length of the rod as L.

L = 30n + 7 (where 'n' represents the number of 30 cm pieces)

Similarly, when the rod is cut into pieces of 28 cm each, there is a piece of 5 cm left out. So, the length of the rod is a multiple of 28 cm plus 5 cm.

L = 28m + 5 (where 'm' represents the number of 28 cm pieces)

We need to find the smallest value for L that satisfies both equations.

To find the smallest value for L, we substitute the LCM (210) into both equations:

30n + 7 = 210 (Equation 1)
28m + 5 = 210 (Equation 2)

Now, let's solve these equations to find the values of 'n' and 'm'.

From Equation 1, we subtract 7 from both sides:

30n = 203

Dividing both sides by 30, we get:

n ≈ 6.7667

Since 'n' represents the number of pieces, we must round it up to the next whole number (7), because we cannot have a fraction of a piece.

From Equation 2, we subtract 5 from both sides:

28m = 205

Dividing both sides by 28, we get:

m ≈ 7.3214

Again, 'm' represents the number of pieces, so we round it up to the next whole number (8).

Now, let's find the length of the shortest rod by substituting the values of 'n' and 'm' back into either equation.

Using Equation 1:

L = 30n + 7
L = 30 × 7 + 7
L = 210 + 7
L = 217 cm

Therefore, the length of the shortest rod is 217 cm.