james bought 24 bolts at the hardware store for a total of $9.00. some were 3-inch bolts that cost 36 cents each and the others are 4-inch bolts that cost 42 cents each. How many 3-inch bolts did james buy?

Let's assume that James bought x 3-inch bolts.

Then, he bought 24 - x 4-inch bolts.
The cost of x 3-inch bolts is 36x cents.
The cost of (24 - x) 4-inch bolts is 42(24 - x) cents.
The total cost of the bolts is 36x + 42(24 - x) cents.
Since the total cost is $9.00, we can write the equation:
36x + 42(24 - x) = 900.
Expanding the expression, we get:
36x + 1008 - 42x = 900.
Combining like terms, we get:
-6x + 1008 = 900.
Subtracting 1008 from both sides, we get:
-6x = -108.
Dividing both sides by -6, we get:
x = 18.
Therefore, James bought 18 3-inch bolts. Answer: \boxed{18}.

Let's assume James bought x number of 3-inch bolts and y number of 4-inch bolts.

Given that he bought 24 bolts in total, we can write this as an equation:

x + y = 24 (Equation 1)

The total cost of the 3-inch bolts is $0.36 each, so the cost can be calculated as:

0.36x

The total cost of the 4-inch bolts is $0.42 each, so the cost can be calculated as:

0.42y

The total cost of all the bolts is given as $9.00, so we can write another equation:

0.36x + 0.42y = 9.00 (Equation 2)

Now we can solve these two equations simultaneously to find the values of x and y.

Multiplying Equation 1 by 0.36, we get:

0.36x + 0.36y = 8.64 (Equation 3)

Now, we can subtract Equation 3 from Equation 2 to eliminate the x term:

0.36x + 0.42y - (0.36x + 0.36y) = 9.00 - 8.64

0.42y - 0.36y = 0.36

0.06y = 0.36

Dividing both sides by 0.06, we get:

y = 6

Substituting the value of y in Equation 1, we can find the value of x:

x + 6 = 24

x = 24 - 6

x = 18

Therefore, James bought 18 of the 3-inch bolts.