Prompt the user to enter the price for apple

Assignment Help Programming Languages
Reference no: EM13951172

C program: Grocery Checkout total. Implement the pseudocode developed in Week 2. Insert meaningful comments at least once for every few lines of the program. Please do not use loops or arrays.
prompt the user to enter the price for apple
read apple_price

prompt the user to enter the price for banana
read banana_price

prompt the user to enter the price for grades
read grapes_price

prompt the user to enter the price for pears
read pears_price

prompt the user to enter the price for tomato
read tomato_price

prompt the user to enter the weight for apple
read apple_weight

prompt the user to enter the weight for banana
read banana_weight

prompt the user to enter the weight for grades
read grapes_weight

prompt the user to enter the weight for pears
read pears_weight

prompt the user to enter the weight for tomato
read tomato_weight

compute total = apple_price * apple_weight + banana_price * banana_weight + grapes_price * grapes_weight + pears_price * pears_weight + tomato_price * tomato_weight

if total > 50
apply 5% discount
output the discount and the new total.
else
output total
endif

Reference no: EM13951172

Questions Cloud

Problem regarding employees intrinsic interest : Although rewards can be motivating, they can reduce employees' intrinsic interest in the tasks they are doing. Along these lines, Mark Lepper of Stanford University found that children rewarded for drawing with felt-tip pens no longer wished to us..
Program for an automatic teller machine that dispenses money : The user should enter the amount desired (a multiple of ten dollars) and the machine dispenses this amount using the least number of bills.
Most important security issues facing companies today : Answer these three questions below iIn AT LEAST 350 words or more. You MUST use at least one outside source with APA citations and references.
Web analyst for friends of disaster relief : YOUR TOPIC: You are the new Web Analyst for Friends of Disaster Relief (FDR) a non-profit organization. The company executives and the Marketing team cannot figure out why the organization is not receiving the expected targeted donations from the..
Prompt the user to enter the price for apple : C program: Grocery Checkout total. Implement the pseudocode developed in Week 2. Insert meaningful comments at least once for every few lines of the program.
Role of intellectual capital in an organization : What is intellectual capital? What is the role of intellectual capital in an organization? How has the value of intellectual capital evolved over time?How does intellectual capital align with a company's mission, vision, and strategy?
Discuss computed values of r, r-squared and regression model : State the hypothesis to be tested. Discuss the computed values of R, R-squared and the regression model. State the reject / not reject decision and conclusion.
Write c++ statements that define the function grade : Write C++ statements that define the function grade whose declaration is:
How about collaboration with governments : What sort of human capital for what kinds of strategic business unit - Should Tata prioritize on "star" industry, "Budding" industry, and "Bread & Butter" industry

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd