Question

This needs to be written in C.

4. Create a Shop Revenue program that, using the following formula, prompts a user for numbers to determine total revenue for

0 0
Add a comment Improve this question Transcribed image text
Answer #1
#include <stdio.h>

int main() {
    double price;
    int quantity;
    printf("Enter price per one item: ");
    scanf("%lf", &price);
    printf("Enter quantity: ");
    scanf("%d", &quantity);
    printf("Total revenue is $%.2lf\n", price*quantity);
    return 0;
}
Add a comment
Know the answer?
Add Answer to:
This needs to be written in C. 4. Create a Shop Revenue program that, using the...
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
  • in C programming language Build a shop Commission program that prompts a user for data and...

    in C programming language Build a shop Commission program that prompts a user for data and determine the commission for a merchant selling gear using the following formula: Commission = Rate * (Sales Price - Cost)

  • This needs to be written in C. 8. Create a calendar program using the current month (similar to t...

    This needs to be written in C. 8. Create a calendar program using the current month (similar to the one shown in Figure 1.6). 5. Create a program that uses escape sequence \" to print your favorite quote. 6. Create a program that uses escape sequence 11 to print the following directory structure: c:lcygwin\homeladministrator. 7. Write a program that prints a diamond, as shown here: 2 8. Create a calendar program using the current month (similar to the one shown...

  • Using C++ Design a program that Prompts the user to enter in 4 numbers, then have...

    Using C++ Design a program that Prompts the user to enter in 4 numbers, then have the program arrange the numbers entered in Ascending order using "if" statements to complete the task...

  • Create a Python program using a list. You are the owner of a cheese shop, "The...

    Create a Python program using a list. You are the owner of a cheese shop, "The Deceased Macaw" and a customer has arrived. Write a program to greet them. You should first ask if the customer is interested in cheddar, if so, then they are given cheddar. Otherwise, you say that you'll find something. If they say that they don't want cheese, you ask them why they are in a cheese shop? In this exercise, valid user responses are "yes"...

  • Using C++ create a lotto program Lottery Design a program that simulates a lottery. Requirements:  The program...

    Using C++ create a lotto program Lottery Design a program that simulates a lottery. Requirements:  The program should have an array of 5 integers named lottery and should generate a random number in the range of 1 through 99 for each element of the array. The user should enter five digits, which should be stored in an integer array named user. The program is to compare the corresponding elements in the two arrays and keep a count of the digits that...

  • C++ Programming: Using Conditions Hello, can anyone create a C++ program that will allow me to...

    C++ Programming: Using Conditions Hello, can anyone create a C++ program that will allow me to ask the user to supply the current total and the quantity of the hardware purchased. This program should calculate the grand total based on the number of units purchased as shown in the chart below: Amount of Hardware Discount Received 10-19 20% 20-49 30% 50-99 40% 100 or more 50% Also, make sure to certify what happens when the user enter 0 or less...

  • Using C#, create a class in a file MathOP.cs. MathOP.cs needs to include the following methods MathAdd: to add two numb...

    Using C#, create a class in a file MathOP.cs. MathOP.cs needs to include the following methods MathAdd: to add two numbers MathSub: to subtract two numbers Next, create a new class MathOP2 (MathOP2.cs) that Inherits from MathOP.cs. MathOP2.cs needs to include the following methods MathMult: to multiply two numbers MathDiv: to divide two numbers Allinone: accepts two parameters and set 4 class variables: v_add, v_subtract, v_multiply, and v_divide and show how these values are retrieved. Finally, create a program TestMathOP.cs...

  • Create a program in Python that will allow the user to enter a temperature in Fahrenheit...

    Create a program in Python that will allow the user to enter a temperature in Fahrenheit which will then be converted to degrees Celsius. The program will keep asking the user for a Fahrenheit temperature until the user enters Q to quit. After each conversion the program needs to print out the degrees Celsius. The input prompts for this problem need to look like the following: Degrees Fahrenheit: Continue: For these input prompts watch the capitalization and spacing. There are...

  • CPT 180 Chapter 2 Assignment 3 Directions Using the following guidelines, create a python program. 1....

    CPT 180 Chapter 2 Assignment 3 Directions Using the following guidelines, create a python program. 1. Create a program named printRandomNumbers that gets input from the user and then produces a list of random numbers. 2. Import the random module 3. Add three comment lines at the top of the program that contain: a. Program Name b. Program Description c. Programmer's Name (You) 4. Prompt the user for the following: a. Number of random numbers required b. Lower limit of...

  • *Using C++* You will create a program that uses a Critter class to move around a...

    *Using C++* You will create a program that uses a Critter class to move around a Grid, which is also a class. The Critter and the Grid classes will be in separate files. The Critter class will have a data member to count the number of moves made. It will also need data members to hold the current x and y coordinates. It will have a member function that randomly moves it one space in one of 4 directions. You...

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