1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
weeeeeb [17]
2 years ago
9

can helper help me I already post my code in comment please help me correct it because my code cannot run​

Computers and Technology
1 answer:
Ann [662]2 years ago
7 0

The code that fixes the errors is:

<h3>The Program</h3>

#include <stdio.h>

int main()

{

 const double KEYBOARD_PRICE = 35.50;

  const double MOUSE_PRICE = 12.90;

  const double MONITOR_PRICE = 600.00;

  const double PRINTER_PRICE = 168.00;

  const double SPEAKER_PRICE = 120.00;

  const double tax = 0.0825;

  int keyboardQty, mouseQty, monitorQty, printerQty, speakerQty;

 

  printf("Enter the number of items sold: ");

  printf("Keyboard > ");

  scanf("%d", &keyboardQty);

  printf("Mouse > ");

  scanf("%d", &mouseQty);

  printf("Monitor > ");

  scanf("%d", &monitorQty);

 

  printf("Printer > ");

  scanf("%d", &printerQty);

 

  printf("Speaker > ");

  scanf("%d", &speakerQty);

  double keyboardTotal = KEYBOARD_PRICE * keyboardQty;

  double mouseTotal = MOUSE_PRICE * mouseQty;

  double monitorTotal = MOUSE_PRICE * monitorQty;

  double printerTotal = PRINTER_PRICE * printerQty;

  double speakerTotal = SPEAKER_PRICE * speakerQty;

  //double subtotal = ...

  printf("%-3s\t%-11s\t%-10s\t%-11s\n", "QTY", "DESCRIPTION", "UNIT PRICE", "TOTAL PRICE");

  printf("%-3s\t%-11s\t%-10s\t%-11s\n", "---", "-----------", "----------", "-----------");

  printf("%d", keyboardQty);

  printf("%-3d\t%-11s\t%-10.2f\t%-11.2f\n", keyboardQty, "KEYBOARD", KEYBOARD_PRICE, keyboardTotal);  

}

Read more about computer programs here:

brainly.com/question/23275071

#SPJ1

You might be interested in
Why did latex replace wax?
andrezito [222]

Answer:

Latex replaced wax because it did the same thing and was used for the same things that wax would be used for

Explanation:

3 0
3 years ago
Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (a
allsm [11]

Answer:

The code is below. The output is "Eric went to Chipotle to buy 12 different types of Cars"

Explanation:

import java.util.scanner;

public class labprogram {

    public static void main (string [ ] args) {

    scanner scnr = new scanner (system.in) ;

    string firstname;

    string genericlocation;

    int wholenumber;

    string pluralNoun;

   firstName = scnr.next();

   genericLocation = scnr.next();

   wholeNumner = scnr.nextInt();

   pluralNoun = scnr.nextLine();

   system.output.println(firstname + " went to " + genericlocation + " to buy " + wholenumber + " different types of " + pluralnoun + " . ");

}

 }

6 0
3 years ago
Cheri needs to write a small program that interacts with the user. What step will allow her to do this?
Alinara [238K]

Answer:

Including a input statement

Explanation:

You need a input statement in order for it to work, here´s an example;

script.parent.click <u>then</u>

you need the ¨.mouse¨ after parent or it wouldnt work.

8 0
3 years ago
Read 2 more answers
Create a class Circle with one instance variable of type double called radius. Then define an appropriate constructor that takes
Mrrafil [7]

public class Circle {

// the private data members

private double radius;

private double area;

private double diameter;

public void setRadius(double r)

{

 radius = r;

}

public double getRadius()

{

 return radius;

}

public double computeDiameter()

{

 return radius * 2;

}

public double computeArea()

{

 return ((radius * radius) * 3.14);

}

}

4 0
3 years ago
How can getchar function be used to read multicharacter strings?​
alex41 [277]

69696969696969969696969696966969696969696V69696969696969969696969696966969696969696VVVV696969696969699696969696969669696969696966969696969696996969696969696696969696969669696969696969969696969696966969696969696V69696969696969969696969696966969696969696V6969696969696996969696969696696969696969669696969696969969696969696966969696969696V69696969696969969696969696966969696969696VVVV696969696969699696969696969669696969696966969696969696996969696969696696969696969669696969696969969696969696966969696969696V69696969696969969696969696966969696969696V6969696969696996969696969696696969696969669696969696969969696969696966969696969696V69696969696969969696969696966969696969696VVVV696969696969699696969696969669696969696966969696969696996969696969696696969696969669696969696969969696969696966969696969696V69696969696969969696969696966969696969696V69696969696969969696969696966969696969696

5 0
3 years ago
Other questions:
  • Landon starts his computer and receives the error message, "Hard drive is not found." In a panic, he calls you because he did no
    14·2 answers
  • Local television news networks cover only
    8·2 answers
  • In Java
    6·1 answer
  • Write a function so that the main program below can be replaced by the simpler code that calls function mph_and_minutes_to_miles
    7·1 answer
  • Which of the following is a true statement?
    12·2 answers
  • A user has just reported that he downloaded a file from a prospective client using IM. The user indicates that the file was call
    11·1 answer
  • What is the trickiest time of the day to drive? A. Early morning B. Late night C. After the sun sets
    8·2 answers
  • A database administrator (DBA) must have a clear understanding of the fundamental business of an organization, be proficient in
    12·1 answer
  • I connected to an external hard drive to transfer some photos from my vacation. When I try to drag the photo, it bounces right b
    14·1 answer
  • Part of the operating system core is responsible for controlling security, managing the file system, and providing a platform fo
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!