Question

For this problem all the variables that you declar I need a program in the language C. Thanks!
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Program:

#include
int main()
{
   int egg,cartons,cases;
   printf("No of egg harvested today : ");
   scanf("%d",&egg);
   cases=egg/(12*24);
   egg%=(12*24);
   cartons=egg/12;
   egg%=12;
   printf("No. of Cases : %d",cases);
   printf("\nNo. of Cartons : %d",cartons);
   printf("\nSingle egg left : %d",egg);
   return 0;
}

Result:

o of egg harvested today 2000 No. of Cases 6 o. of Cartons 22 Single egg left 8 Process exited after 2.477 seconds with retur

Add a comment
Know the answer?
Add Answer to:
I need a program in the language C. Thanks! For this problem all the variables that...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need help with the following. I need to write a program code in Java using...

    I need help with the following. I need to write a program code in Java using NetBeans. It is from How to Program Java book Chapter 2. This program should calculate the packing of Candles. First read: The number of candles The number of candles that fit in each case Then calculate and print: The number of full cases The number of candles left over (partial case) If this order is large (more than 5 full cases needed) An extra...

  • I need help with Part 2! Coded in Java please! Abby wants to start a backyard...

    I need help with Part 2! Coded in Java please! Abby wants to start a backyard chicken egg business. As any good she wants to “count the costs” of such an operation to determine if she can make a profit. While there are a number of variables, naturally the most influential ones are: Number of chickens Average number of eggs laid per day per chicken Pounds of feed per chicken per day Cost per pound for feed Empty carton cost...

  • For programming C language This problem will be briefly discussed in Lab2 and the TĀ will...

    For programming C language This problem will be briefly discussed in Lab2 and the TĀ will give you hints to solve it. However, the TĀ will not write the code. This code is a bit complicated, so try to understand the process from the TA so that you can continue working on it at home. Reverse the Number Write a program that takes a 5-digit number as input and print the reverse of the number. Sample Input/Output: Enter a five...

  • I need a C++ program like this please! and please follow all instructions! Thanks so much!...

    I need a C++ program like this please! and please follow all instructions! Thanks so much! A menu-driven program with 3 choices: Names Rearranger, Number Validator, or Exit Menu Option 1: Name Rearranger: 1. Input ONE STRING from the user containing first name, middle name, and last name. ie, "John Allen Smith". USE THE GETLINE function. (Not cin) 2. Loop through the string and validate for a-z or A-Z or . If the name has any other characters, then ask...

  • Hi I need help doing this problem *The program must re-prompt as long as invalid input...

    Hi I need help doing this problem *The program must re-prompt as long as invalid input is inserted Implement a program that manages shapes. Implement a class named Shape with a virtual function area()which returns the double value. Implement three derived classes named Diamond, Oval, and Pentagon. Declare necessary properties in each including getter and setter function and a constructor that sets the values of these properties. Override the area() function in each by calculating the area using the defined...

  • What is the problem with my Program ? also I need a Jframe that desplays the...

    What is the problem with my Program ? also I need a Jframe that desplays the original input on the left side and the sorted input of the left side. my program is supose to read the number for basketball players, first name, last name, and float number that is less than 0 . on the left sideit is supposed to sort all this input based on last name. This is my demo class : package baseball; import java.io.*; import...

  • I need help with my homework please. I should write this program in C++ language and...

    I need help with my homework please. I should write this program in C++ language and use Inventory.h file (header file), Inventory.cpp file (implementation file), and main.cpp file (main program). This is the program: Demonstrate the class in a driver program. Input validation, don’t accept negative values for item number, quantity, or cost. 6. Inventory Class Design an Inventory class that can hold information and calculate data for items ma retail store's inventory. The class should have the following private...

  • Hi there I need help coming up with the C code for this problem. At the...

    Hi there I need help coming up with the C code for this problem. At the beginning of the program and before each function use comments to explain what the function does. Do not use global variables 1. The Pascal triangle can be used to compute the coefficients of the terms in the expansion of atb In a Pascal triangle, each element is the sum of the element directly above it and the element to the left of the element...

  • C LANGUAGE!!! The program uses both files and two dimensional arrays. The Problem Statement Business is...

    C LANGUAGE!!! The program uses both files and two dimensional arrays. The Problem Statement Business is going well for your friend, who is selling discounts to area clubs and restaurants, which means that business is going well for you! Both of you have decided that you'll advertise on memory mall, which is roughly arranged as a rectangle. There's not enough time before a football game to hand flyers to everyone arranged on the mall. Therefore, you will only be able...

  • PLEASE I NEED C# PROGRAM WITH DETAILS Objectives Apply recursion to a more difficult problem. Background...

    PLEASE I NEED C# PROGRAM WITH DETAILS Objectives Apply recursion to a more difficult problem. Background There are many problems that loops simplify, such as displaying every pixel to a screen or receiving repetitive input. However, some situations that can be simplified with looping are not easily solvable using loops. This includes problems that require back tracking and being able to use information from previous iterations, which would normally be lost when using an iterative loop. In those cases, it...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT