Free Essay

Marketinf Mix

In:

Submitted By chin123
Words 413
Pages 2
Practical 5: Simple functions

1. Write one program to accept two input values x and y and find the values of the following:

(a) [pic] (b) [pic][pic] (c) [pic] (d) [pic] (e) [pic]

(NOTE: log10(x) function is used to calculate log10x) #include #include int main()

{ int x,y ; double a,b,c,d,e;

printf("Enter 2 integer :\t"); scanf("%d%d",&x,&y);

//calculation a=sqrt(x*y);

b=(sqrt(x))*(sqrt(y));

c=pow(x,y);

d=pow(y,x);

e=log10(pow(x,y));

printf("%lf\n",a); printf("%lf\n",b); printf("%lf\n",c); printf("%lf\n",d); printf("%lf\n",e);

return 0; }

2. Write a program that prompts the user for the Cartesian coordinates to two points [pic]and [pic] and display the distance between them computed using the following formula:

distance = [pic]

#include
#include
int main()

{ int x1,x2,y1,y2 ; double dis ;

printf("Enter 4 integer :\t"); scanf("%d%d%d%d",&x1,&x2,&y1,&y2);

//calculation dis=sqrt(pow(x1-x2,2))+(pow(y1-y2,2));

printf("The distance is %.2lf\n",dis);

return 0;
}
3. Write a program to compute and display the absolute difference of two type double variables, x and y (that is | x - y |).

#include #include int main ()

{ double x,y,diff;

printf("Enter 2 numbers :"); scanf("%lf%lf",&x,&y);

//calculation diff=(x-y);

printf("The difference of 2 numbers is %.2lf\n",diff);

return 0; }

4. Write a name function that displays your name and another address function that displays your address. Write a pseudocode and a C program to call these functions to display your name and your address.

#include void name (); void address ();

int main() { name (); address ();

return 0; }

void name() { printf("chin\n");

return; }

void address() { printf("88 jalan manggis\n"); return;

}

5. Draw a flowchart and write a program for menu function that displays three choices of fast food. (You may use examples of KFC, McDonalds or Pizza) and allow user to key in his choice. Return this choice to main function and print his choice on the screen.

#include int menu();

int main() { int choice;

choice = menu(); printf("The choice is %d\n",choice); return 0; }

int menu() { int option;

printf("Menu selection\n"); printf("===================\n"); printf("1 , fried jeffrey\n"); printf("2 , Fred pie\n"); printf("3 , Hong juice\n"); printf("4 , kam fai pizza\n") printf("===================\n"); printf("Please enter ur choice >"); scanf("%d",&option);

return option;

}

Similar Documents

Premium Essay

Case Study Kristen's Cookie

...Case Report: Kristen's Cookie company 1. It takes 26 minutes to complete a rush order, that is, the addition of the time it takes to complete each step: 6 (wash and mix) + 2 (spoon) + 10 (load and bake) + 5 (unload and cool) + 2 (pack) + 1 (pay) = 26. Process flow diagram of the cookie-making process: Me Mixer Me Spoon and tray Roommate Oven and tray Oven and tray INPUT OUTPUT Roommate Oven and tray Tray Roommate Roommate Remarks: Since it does not consume any time, the first step, that is to take an order, is here ignored. Inventory is not kept at any time as the cookie dough is continuously being processed by the dozen to fit the bottleneck's capacity and only produce fresh cookies according to placed orders. 2. We assume the following: The minimum amount of cookies per order is one dozen cookies (the case states that the process produces “cookies by the dozen”). There are at least two trays and spoons, as the case mentions “cookie trays” and “spoons” Since the amount of time necessary to unload the oven is considered “negligeable”, it can be done during the same minute used to load the next batch. In this view, the first order takes 26 minutes but each following batch only requires an additional 10 minutes (see Gantt chart 1 attached). Capacity of resources (dozen cookies per hour): | Me | Roommate | Mixer (1) | Trays (2) | Spoons (2) | Oven (1) | Cycle time | 8mns/unit | 4mns/unit...

Words: 844 - Pages: 4

Free Essay

Cinnamon Rolls

...FLOUR,WHEAT,BREAD SHORTENING,SOFTENED BUTTER VANILLA GLAZE Weight Measure Issue 6-3/4 oz 1 lbs 1-5/8 lbs 1-1/4 lbs 1-1/8 lbs 1-3/4 oz 1-7/8 oz 7-7/8 lbs 14-1/2 oz 8 oz 1 cup 2 cup 3 cup 2-1/4 cup 2-5/8 cup 3/4 cup 3 tbsp 1 gal 2-1/2 qts 2 cup 1 cup 2-3/8 cup Method 1 Sprinkle yeast over water. DO NOT USE TEMPERATURES ABOVE 110 F. Mix well. Let stand 5 minutes; stir. Set aside for use in Step 3. Place water, eggs, sugar, milk, and salt in mixer bowl. Using dough hook, mix at low speed just until blended. Add flour and yeast solution. Mix at low speed 1 minute or until all flour mixture is incorporated into liquid. Add shortening; mix at low speed 1 minute. Continue mixing at medium speed 10 minutes or until dough is smooth and elastic. Dough temperature should be between 78 F. to 82 F. FERMENT: Cover. Set in a warm place (80 F.) about 1-1/2 hours or until double in bulk. PUNCH: Divide dough into 3 pieces, 4 lb 5 oz each; shape into a rectangular piece. Let rest 10 to 20 minutes. MAKE-UP: Roll each 4 lb 5 oz piece of dough into a long rope of uniform diameter. (If using D 036 01, Sweet Dough Mix, use 4 lb 2 oz pieces.) Slice into 34 pieces, weighing 1-3/4 to 2 oz each. Shape into balls by rolling with a circular motion. Place on lightly greased sheet pans in rows 6 by 9. Melt butter or margarine. Brush 1/2 cup on rolls in each pan. PROOF: At 90 F. to 100 F. until double in bulk. BAKE: At 375 F. for 20 to 25 minutes or until golden brown or...

Words: 382 - Pages: 2

Premium Essay

Kirsten's Cookie

...Kristen’s Cookie 1. How long does it take to fill a rush order [from mix and spoon, Load oven, bake, cool pack, and receive payment] ? (For orders of one dozen, and for orders of two dozens-same ingredients.) Answer: (a) for orders of one dozen 26 minutes (b) for orders of two dozens 36 minutes 2. For orders of one dozen, how many orders can you fill in a night? Assuming 4 hours per night - every order has a different recipe (so it does not add value to put pre-mixed ingredients ‘on stock’ during the night. - There are enough cookie trays (only the oven is a bottleneck) - The first step requires 6 minutes of attention, cleaning and loading the mixing equipment  Capacity limited by throughput oven: o 4 hours = 240 minutes o Preparation before oven first batch - 8 minutes o Handling after last oven - 8 minutes (potentially one minute can be saved on the last 8 minutes, by preparing the invoice during the cooling time, but it has no impact on the total number of batches) - Remaining time for oven processes = 224 minutes Answer: 22 orders if me and my roommate stick to the described processes 3. (A) Given Kristen’s Cookie wants to maximize the revenue, do you need to employ your roommate if all orders are one-dozen orders(assuming orders do not have the same ingredient)? Answer: Need / No need Why? The takt time of the line is determined by the oven (bottleneck operation, excluding start up and close...

Words: 539 - Pages: 3

Premium Essay

Slime Lab Report

...thickened gel, or slime. Up until I did the research, I figured that glue was already a bit like slime only much thinner. And the same way you would add flour to cookie dough that is too sticky or thin, adding borax would make it clump up more. The very first time I attempted making slime, I mixed less than half of a teaspoon of Borax into a teaspoon of glue, then added water. It was unsuccessful. It was too slippery and you could feel the Borax in it, meaning it didn’t mix well together. The second time I attempted, I did the same thing only added the glue into the Borax, which also didn’t mix very well. So I tried my 3rd and 4th trial a little differently by mixing water and glue the first time, slowing add Borax looking for the right amount. And mixing water and Borax adding small amounts of glue at a time the second time. Neither of them worked either. I think I had the right idea with adding water to only one of the ingredients at a time, seeing how it didn’t mix well… I thought of a way to make it mix in better. They were both close but no cigar. All of my slime attempts were a bit off. A bit too gritty, a bit too liquidy, not sticky enough, not bouncy enough. It all smelled like glue and made a mess of my hands. Eventually after the 5th failed attempt of randomly mixing all ingredients in different parts, amounts & orders… I just stuck...

Words: 550 - Pages: 3

Premium Essay

How to Make a Cake

...How to Make the Perfect Cake! Cake: Strawberry Decadence Cake Mix Ingredients: 2 1/4 cups Cake flour 1 1/2 cups Sugar 3 teaspoons Baking powder 1 teaspoon Salt 1/3 cup Vegetable oil 1 cup Milk 1 1/2 teaspoons Vanilla Extract 2 Egg whites Whisk Other Ingredients: 20 ounces of Strawberries Cool Whip 2 9 x 13-inch round pan Wooden Spoon Mixer Pam 2 Mixing Bowl There are four steps that one must follow exactly in order to make a perfect cake: 1. Preparation 2. The Cake Mix 3. Putting the Cake Together 4. Enjoy Step 1: Preparation The most important part of baking a cake is the preparation that must be done before you start. First get out all the ingredients needed to make the cake and separate the cake mix ingredients from the other ingredients that you will need later on, except the two mixing bowls and the mixer, which will be needed to make the cake mix. Then you need to use Pam to spray the two 9 x 13 inch round pans, so that the cake won’t stick and can be dumped from the pan once it has been baked. Finally pre-heat the oven to 350F. Step 2: The Cake Mix Now it is time to make the cake mix that will be used to make the cake. (This is the stuff that amateurs get from the cake box at the store) Jesse Long Tuesday, April 24, 2012 10:26:12 AM ET 04:0c:ce:d2:70:d6 In the mixing bowl add the 2 1/4 cups of flour, 1 cup of sugar, 3 teaspoons of baking powder, 1 teaspoon of salt, 1/3 cup of vegetable oil, 1/2 a cup of milk, and the 1 1/2 teaspoons of vanilla extract...

Words: 855 - Pages: 4

Free Essay

Kristen’s Cookie Company Case Report

...Kristen’s cookie company pre-case report DSC335 1. Draw a flow chart of the cookie-making process 2. How long will it take to fill a rush order of 1-dozen cookie? It will take 26 minutes to fill a rush order of 1-dozen cookie. (I revise my chart to 4 cycle orders) 3. What is the cycle time? How many orders can you fill in a night (4-hour period)? Does your answer depend on the size of the order, 1-dozen, 2-dozen, or 3-dozen? 1-dozen orders: The cycle time is 10 minutes. The first order of 1-dozen cookies will take 26 minutes, and each 10 minutes for another 1-dozen cookie order. (4*60-26)/10=21.4 plus the first order, we can make 22 orders of 1-dozen cookie fill in a night. 2-dozen orders: The cycle time is 20 minutes. The first order of 2-dozen cookies will take 36 minutes, and each 20 minutes for another 2-dozen cookie order. (4*60-36)/20=10.2 and plus the first order, we can make 11 orders of 2-dozen cookie fill in a night. 3-dozen orders: The cycle time is 30 minutes. The first order of 3-dozen cookies will take 46 minutes, and each 30 minutes for another 3-dozen cookie order. (4*60-46)/30=6.47 and plus the first order, we can make 7 orders of 3-dozen cookie fill in a night. 4. What is the difference in labor (both you and your roommate’s time) per dozen among 1-dozen, 2-dozen, and 3-dozen orders? 1-dozen orders: Me: Wash and Mixing 6 minutes + fill the tray 2 minutes = 8 minutes +my roommate: Setting timer and putting in the oven 1 minute...

Words: 682 - Pages: 3

Premium Essay

Marketing

...during the next three years. Introduction of the “Bake Right “product line to the market will require additional efforts on the manufacturing floor and possibly adding weekend shift to meet the expected demand. The Engineering department has suggested a project to automate all Dolly Madison Bakery products. This manufacturing line will perform all operations needed to produce Dolly Madison Baker products from beginning to finish. Automated operations will include: 1. Automated mixers – These mixers are capable to mix different recipes and will have preprogrammed weight checkers with automated feeders. 2. Screw driven extruders machines – Once the mixes are ready will fed the extruders machine tha will inject the mix into preformed trays. 3. Heat tunnel – the trays with the recently extruded mix will travel along a conveyor. This conveyor will be driven through a Heat Tunnel were the mix will be exposed to enough heat during a predetermined time to bake the mix and convert it onto the final product. 4. Cooling tunnel - Once the product has been baked it will pass through a cooling tunnel where the product will come to room temperature and will be suitable for packaging. 5. Off loading robot arm – After the product has reached right temperature a robot arm will perform a pick and place operation and will load the product the...

Words: 561 - Pages: 3

Premium Essay

How to Make a Birthdaycake

...Have you ever wanted to make a birthday cake for a loved one? Well, here is how to make a simple birthday cake. All you'll need is a little time, love, and a few items from the grocery store. You will need a boxed cake mix ,shortening, eggs, oil, and flour. You will need to gather a few items: a large mixing bowl, a large cake pan, an electric mixer or a large mixing spoon, a spatula, and measuring cups and spoons. First, you will need to wash your hands and work area. Read through the directions on the cake box to be sure you have everything you need. Then, gather all of your equipment and food items in your work area, organize it according to the order you will use them in making your cake. Be sure to preheat your oven to the appropriate temperature before you begin. Next, put the dry cake mix into your large mixing bowl. Then, put the prescribed amount of water, oil, and eggs into the mix. Then, with the electric mixer or mixing spoon mix the batter until it is smooth and free of clumps. Next, grease the large cake pan with the shortening. If you wish, you can wrap your fingers with wax paper to keep them from getting greasy. Then, flour the pan lightly. If you do this over the garbage can it will be easier to clean your work area later. Next, pour the cake batter into the cake pan, using the rubber spatula to scrape all of the batter off of the sides of the bowl. Be sure the batter is level in the pan so it will rise evenly. Next, place the cake on the top rack of the...

Words: 463 - Pages: 2

Premium Essay

Mana

...Fluorides reduce decay by increasing the strength of teeth. Sodium fluoride is the most commonly used fluoride. Sodium perborate is used as a tooth whitening ingredient. Most toothpastes contain the preservative p-hydrozybenzoate. Water is also used for dilution purposes. The Manufacturing Process Weighing and mixing • 1 After transporting the raw materials into the factory, the ingredients are both manually and mechanically weighed. This ensures accuracy in the ingredients' proportions. Then the ingredients are mixed together. Usually, the glycerin-water mixture is done first. • 2 All the ingredients are mixed together in the mixing vat. The temperature and humidity of vat are watched closely. This is important to ensuring that the mix comes together correctly. A commonly used vat in the toothpaste industry mixes a batch that is the equivalent of 10,000 four-ounce (118 ml) tubes. Filling the tubes • 3 Before tubes are filled with toothpaste, the tube itself passes under a blower and a vacuum to ensure cleanliness. Dust and particles are blown out in this step. The tube is capped, and the opposite end is opened so the filling machine can load the paste. • 4 After the ingredients are mixed together, the tubes are filled by the filling machine. To make sure the tube is aligned correctly, an optical device rotates the tube. Then the tube is filled by a descending pump. After it is filled, the end is sealed (or crimped) closed. The tube also gets a code stamped on it indicating...

Words: 312 - Pages: 2

Free Essay

Kristen's Cookie Company

...1. How long will it take you to fill a rush order? It takes twenty-seven minutes to fill a rush order of one dozen cookies because it takes 1 minute to receive, read, print, and send reply to the customer order; 6 minutes to place all the ingredients of the order into a mixing bowl, up to three dozen cookies worth, and mix; 2 minutes to spoon the cookie dough onto a tray, a dozen per tray; 10 minutes to put the cookie into the one tray capacity oven, set the timer, and bake the cookies; 5 minutes to take the cookies out of the oven and let them cool; 2 minutes per dozen to take the cookies off the tray and carefully pack them into a box; and 1 minute to accept payment for the order. The overall process takes 19 minutes per dozen and a constant 8 minutes for every order under four dozen cookies because of each order under four dozen will always take 2 minutes to receive and accept payment for the order and 6 minutes to mix ingredients up three dozen cookies worth. So for a rush order of two dozen it will take 46 minutes and a rush order of three dozen will take 65 minutes. 2. How many orders can you fill in a night, assuming you are open four hours each night? Assuming all orders are only one dozen, we could fill 24 orders in a night because the bottleneck resource of the process, which determines the capacity of the whole process, is the baking in the oven. Baking takes 10 minutes giving it the lowest capacity of all the steps and the capacity of the whole process...

Words: 1165 - Pages: 5

Free Essay

P429 Kristen's Cookie

... I. Flow Diagram for fulfilling an order II. How long will it take to fill a rush order? Washing out mixer bowl and mixing ingredient + Spooning cookie on to tray + Putting cookie in oven & setting timer and baking + Leaving for cool + Packing in a box + Accepting payment 6 + 2 + 10 + 5 + 2 + 1 = 26 min III. How many orders can you fill in a night, assuming you are open four hours each night? Since the required resource for different stages are not all in common, Kristen and his roommate could process two orders simultaneously. However, before starting the second tray of cookie, we need to wait until Kristen is done with washing mixer bowl, mix ingredients and spooning cookie on to tray for the first tray, for which the time lag would be 6 + 2 = 8 min. After Kristen are done with washing mixer bowl, mix ingredients and spooning cookie on to tray for the second tray, they would realize the oven is still in use of baking the first tray of cookie; therefore, we need to wait another 2 minutes for the availability of oven. Thus, the total time lag between the first and the second would be 8 + 2 = 10 min. The expression of the number of minutes to produce n one-dozen batches is: 16+10n≤4*60 So we can get n≤22.4. The nearest integer is 22; therefore, we can fill 22 order in a night in...

Words: 251 - Pages: 2

Premium Essay

Home

...How to Make a Cake Have you ever wanted to make a birthday cake for a loved one? Well, here is how to make a simple birthday cake. All you'll need is a little time, love, and a few items from the grocery store. You will need a boxed cake mix, shortening, eggs, oil, flour, and birthday candles. When you get home, you will need to gather a few items: a large mixing bowl, a large cake pan, an electric mixer or a large mixing spoon, a spatula, and measuring cups and spoons. First, you will need to wash your hands and work area. Read through the directions on the cake box to be sure you have everything you need. Then, gather all of your equipment and food items in your work area, organize it according to the order you will use them in making your cake. Be sure to preheat your oven to the appropriate temperature before you begin. Next, put the dry cake mix into your large mixing bowl. Then, put the prescribed amount of water, oil, and eggs into the mix. Then, with the electric mixer or mixing spoon mix the batter until it is smooth and free of clumps. Next, grease the large cake pan with the shortening. If you wish, you can wrap your fingers with wax paper to keep them from getting greasy. Then, flour the pan lightly. If you do this over the garbage can it will be easier to clean your work area later. Next, pour the cake batter into the cake pan, using the rubber spatula to scrape all of the batter off of the sides of the bowl. Be sure the batter is level in the pan so it will rise...

Words: 473 - Pages: 2

Free Essay

Kristen's Cookie Company

...Case Report: Kristen’s Cookie Company Question 1 How long will it take to fulfill a rush order? | Gantt Chart for Kristen's Cookie Case | | | | | | | | | | | | | To fulfill the rush order it is still necessary to go through all parts of the process illustrated on the process flow diagram of the cookie-making process (it can be found on the last page). As there are no processes that can be done in a parallel way, every stage follows the other. Calculating the time needed for each step it can be concluded that the order can’t be prepared less than in 26 minutes. Question 2 How many orders can you fill in a night, assuming you are open 4 hours each night? We already know from the first question, the first dozen can be fulfilled in 26 minutes. Lets have a look, on the fastest possible way to prepare the second and all the following dozens. I can start preparing the 2nd order as soon as I start heating the oven (the chart visually demonstrates it): According to the chart it takes 26 minutes to fill the first order and 10 minutes more to fill each following order. From here we have: Operating time = 4*60 = 240 minutes The formula for counting the amount of orders that are able to be produced can be seen as: 16+10n <= 240 where n is the numbers of orders. From this equation we get, that n(max) = 22 dozen. So during 4 hours in a night one can prepare 22 dozen of cookies in 236 minutes. Question 3 How much of your own and your roommate’s valuable...

Words: 807 - Pages: 4

Free Essay

Legalizing Marijuana

...Melissa Slone October 27, 2015 Demonstration Speech How to make “Homemade Peanut Butter Pie” Specific Purpose: To demonstrate to my audience how to make a peanut butter pie INTRODUCTION I. Did you know that November is National Peanut Butter lover’s month? It is one of six peanut butter related holidays mentioned on the National Peanut Boards website. (Shreeves, 2014) II. To show my audience one of the easiest and inexpensive ways to make a peanut butter pie. III. After learning how to make this recipe you can make it and take it to any dinner party and it be the Best dessert there. IV. This recipe was handed down from my grandmother and has been a part of our family gatherings for Every holiday and special occasion. I have made it so many times that everyone in my family wants Me to make it every time!! V. This dessert involves 5 different materials and 4 easy steps. I will first, go over the materials you need And the ingredients you need and then go over each step to prepare. TRANSITION: So now, let’s begin with my first point, gathering your materials and ingredients. BODY I. The first step is to gather your materials and ingredients. A. There are 5 materials you’ll need to make this recipe. 1. Large Mixing Bowl 2. Hand Mixer 3. Measuring Spoons 4. Measuring Cups 5. Spoon B. There are 5 ingredients for this...

Words: 453 - Pages: 2

Free Essay

Reverse Engineering

...While concrete has been around in one form or another since before Roman times, in this era the cement was usually mixed by hand using a shovel or spade. However in the late 1920 when the automobile industry started to become popular so did the portable cement mixer or concrete mixer as it is more commonly know in the construction industry. A cement mixer is device often used in the construction industry to produce a concrete substance, this is done by adding compound components such as the concrete powder, mortar and water together with the aid of a cement mixer to mix and fold these components to form what is known as a concrete substance which may be used for the application of bricklaying, foot paths or drive ways. A cement mixer is often used in the construction industry in large quantities however these devices can also be used by DIY householders due to the variety of mixers currently available in today’s market. All mixers leverage power, torque and weight distribution to get the concrete to the site, but getting it out of the truck is where you'll see differences in truck designs. Most of the mixer fleet, especially older batch model trucks use a simple tip-and-pour method to get the concrete out of the mixer. A chute attaches to a port and the concrete pours out of the mixer to the project. Usually, the driver of the truck operates the machinery and aims the chute. Many transit mixers are coupled to a hydraulic lift bed that can tip up the drum, similar to a dump truck...

Words: 409 - Pages: 2