Write in c++
Your friend Michael runs a catering company. Some of the ingredients that his recipes required are measured in cups. When he goes to the grocery store to buy those ingredients, however, they are sold only by fluid ounce. He has asked you to write a simple program that converts cups to fluid ounces. 1 Cup = 8 ounces
You should have the following functions:
Solution:
I have written the c++ code and commented out each step. If you still have any doubt or need modification of the code, feel free to comment it, I'll get back to you ASAP.
Code:
#include<iostream>
using namespace std;
//Function declaration
void showIntro();
int getCups();
int cupsToOunces(int cups);
void displayResult(int fluidOunces);
//Main Function
main()
{
int cups; //To store number of cups
int fluidOunces;
showIntro(); //Printing intro of the store
//Taking the input in number of cups
cups = getCups();
//convert the given cups into fluid ounces
fluidOunces = cupsToOunces(cups);
//Displaying the result in fluid ounces
displayResult(fluidOunces);
}
//Function definition
//This function gives introduction about the grocery store
void showIntro()
{
cout<<"*** Welcome to Stark's grocery store
***"<<endl;
cout<<"*** Please input your order ***"<<endl;
cout<<"Enter the order in cups:";
}
int getCups()
{
int cups;
cout<<"Enter the order in cups:";
cin>>cups; //Taking the order in number of cups
return cups; //returning the number of cups for conversion
}
int cupsToOunces(int cups)
{
return cups*8; //since 1 cup = 8 fluid ounces
}
void displayResult(int fluidOunces)
{
//printing the result in fluid ounces
cout<<"The given order is "<<fluidOunces<<" Fluid
ounces";
}
Results:

Write in c++ Your friend Michael runs a catering company. Some of the ingredients that his...
Write in c++ Your friend Michael runs a catering company. Some of the ingredients that his recipes required are measured in cups. When he goes to the grocery store to buy those ingredients, however, they are sold only by fluid ounce. He has asked you to write a simple program that converts cups to fluid ounces. 1 Cup = 8 ounces You should have the following functions: showIntro – This function will display a message on the screen that explains...
Write a python program that runs only on the command-line prompt. i.e. if you run this program on IDEL it would give you an error message. Name the program “buy.py.” Assume that this program is used by a departmental store to calculate your total price if you want to buy an extended warranty for your purchased Computer. The program takes two arguments at the command-line prompt: 1) the computer’s brand name, and 2) the price of the computer that you...
SYNOPSIS The product manager for coffee development at Kraft Canada must decide whether to introduce the company's new line of single-serve coffee pods or to await results from the product's launch in the United States. Key strategic decisions include choosing the target market to focus on and determining the value proposition to emphasize. Important questions are also raised in regard to how the new product should be branded, the flavors to offer, whether Kraft should use traditional distribution channels or...