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.
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.
Chapter5: Looping
Section: Chapter Questions
Problem 12E
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
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 2 images
Knowledge Booster
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.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,