total students: 18+19 = 37
packs needed for 37 pencils: 37/20 or two packs
cost: 2*2.79 = 5.58
packs needed for 37 pencils: 37/20 or two packs
cost: 2*2.79 = 5.58
The total number of students is 18 (8th graders) + 19 (7th graders) = 37 students.
Each student needs 4 pencils, so we multiply the number of students by the number of pencils per student: 37 (students) * 4 (pencils per student) = 148 pencils.
Now, we divide the total number of pencils by the number of pencils in a pack to determine the number of packs required: 148 (total pencils) / 20 (pencils per pack) = 7.4 packs.
Since we can't have a fraction of a pack, we need to round up to the next whole number. Therefore, we need a minimum of 8 packs of pencils.
The cost of each pack is $2.79, so we multiply the total number of packs by the cost per pack to find the total cost: 8 (packs) * $2.79 (cost per pack) = $22.32.
Therefore, it would cost $22.32 for the 18 8th graders and 19 7th graders to purchase 4 pencils each.