Write a C programthat asks the user to enter the amount of pencils(inKilograms) that he wants to send to his customers. You have to make a function which will display the total number of boxes required to pack these pencils. Start a new thread in which you will call this function. Getthe value of weight of pencilsand calculate the number of boxes. One box can hold up to 50 pencilsand each pencil’s weight is 6 grams(50*6 = 300g). User can enter anyvalue of weight but the number of boxes can never be in floating point so you have to round up the answer to next higherinteger value.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 12E
icon
Related questions
Question

Write a C programthat asks the user to enter the amount of pencils(inKilograms) that he wants to send to his customers. You have to make a function which will display the total number of boxes required to pack these pencils. Start a new thread in which you will call this function. Getthe value of weight of pencilsand calculate the number of boxes. One box can hold up to 50 pencilsand each pencil’s weight is 6 grams(50*6 = 300g). User can enter anyvalue of weight but the number of boxes can never be in floating point so you have to round up the answer to next higherinteger value.

Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Avoiding deadlock
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,