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

  Summary of the technical experiences that you used

Create the logic for a program that accepts input values for the projected cost of a vacation and the number of months until vacation. A summary of the technical experiences that you used in completing this lab. The commands that were of greatest be..

  Create an abstract representation of a generic animal

Create an abstract representation of a generic Animal that has the at least two polymorphic methods for making a sound and showing the image of the animal.

  Non-negative positions in positions

Write a predicate pick(+From, +Positions, -Picked) that unifies Picked with an atom consisting of the characters in From at the zero-based, non-negative positions in Positions.

  Executive committee for alleviating it complexity

You are a consultant brought in by the executive committee to make recommendations for alleviating the "IT complexity" concerns of the executives at the company.

  Explain what purpose it serves

List three debugging techniques, within the debugger, that can be used to locate logical error in the Java code. For each of these tools, explain what purpose it serves and how it relates to the debugging process

  Design a program that will allow a user to input

Demonstrates your thought process and steps used to analyze the problem. Be sure to include the required input and output and how you will obtain the required output from the given input?

  Complete the function function has three parameters

Complete the function: func in the following program. This function has three parameters: The first and second parameters are of type: int. The third one is a function that has two parameters of type: int and returns a value of type: int.

  Program that uses a recursive function to print a string

Your program must contain a recursive function that prints the string backwards. Do not use any global variables; use appropriate parameters.

  Write program which reads three integer from input dialogs

Write down the program which reads three integer. Integers are entered from input dialogs and stored in variable num1, num2, and num3, respectively.

  Write program to allow two users to play tic-tac-toe

Write a program that will allow two users to play tic-tac-toe. The program should ask for moves alternately from player X and player O.

  About html

Hyper Text Markup Language.

  Describe the necessary formulas and sample calculations

Demonstrates your thought process and steps used to analyze the problem. Be sure to include the required input and output and how you will obtain the required output from the given input

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