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
marissa [1.9K]
3 years ago
7

//Display message Module main () // Declare variables Declare real weight Declare real shipping //Get package weight Call getWei

ght (weight) //Calculate the Shipping Charge Call setShipping (weight, shipping) //Display Shipping Charge Call showShipping (shipping) End Module //Display program Module showing () Display "Calculate Fast Freight Shipping Rates Here." End Module //Receive Input From User Module getWeight (Real Ref inputWeight) Display "Enter package weight:", weight Input Weight End Module //Set Shipping Rates Module setShipping (Real weight, Ref calShipping) If weight > 10 Then Set calcShipping = 3.80 Else If weight > 6 Then Set calcShipping = 3.70 Else If weight > 2 Then Set calcShipping = 2.20 Else Set calcShipping = 1.10 End If End Module //Display shipping charges Module showShipping (Real shipping) Display "Shipping charge: $", shipping End Module
Computers and Technology
1 answer:
galina1969 [7]3 years ago
6 0

Answer:

This program is created to Calculate Fast Freight Shipping Rates. It  prompts user to enter the weight of the package, calculates the shipping charges of the package and display the charges on the screen.

Explanation:

#include<iostream>

using namespace std;

// declaring functions

void Display();

float getWeight ();

float setShipping (float);

void showShipping (float);

main()  // main function

{

float Weight, Shipping;

Display();

Weight=getWeight();                     //function call

Shipping=setShipping(Weight);   //function call

showShipping(Shipping);             //function call

 

}

void Display()     // function to display message

{

cout<<"Calculate Fast Freight Shipping Rates Here:"<<endl;

}

 

float getWeight ()    // function to get weight

{

float Weight;

cout<< "Enter package weight:";

cin>> Weight;

return Weight;

}

float setShipping (float Weight)    //funtion to calculate shipping

{

float calShipping;

if (Weight > 10)

calShipping=3.80;

else if (Weight > 6)

calShipping= 3.70;

else if (Weight > 2)

calShipping= 2.2;

else

calShipping= 1.10;

return calShipping;

}

void showShipping (float Shipping)    // funtion to disps chargepping shilay

{

cout<<"Shipping Charges: $" << Shipping;

}

You might be interested in
Which IDEs support multiple high-level programming languages? Select all that apply.
nata0808 [166]

Answer:

eclipse, xcode, and visual studio

6 0
2 years ago
Read 2 more answers
One line of code is missing (marked in
Harman [31]

Answer: num1.plus(1);

Explanation:

4 0
2 years ago
What is a neuromorphic chip?
Dominik [7]

Answer:

A neuromorphic computer is a machine comprising many simple processors / memory structures (e.g. neurons and synapses) communicating using simple messages (e.g. spikes). ... Neuromorphic computing systems excel at computing complex dynamics using a small set of computational primitives (neurons, synapses, spikes).

Explanation:

The structure of neuromorphic computers makes them much more efficient at training and running neural networks. They can run AI models at a faster speed than equivalent CPUs and GPUs while consuming less power. This is important since power consumption is already one of AI's essential challenges.

3 0
3 years ago
Processing information involves ____.a. Performing arithmetic or logical operations on binary data accepting information from th
Iteru [2.4K]

Answer:

c. Both a and b

Explanation:

In computing, processing information simply means performing a task. It means transforming data from one form to another.

In the real sense of it, it means, performing arithmetic or logical operations (by ALU) on binary data which could result in transmitting data from input devices to output devices. When a user launches the calculator application on his PC, and he tries to do some arithmetic (which is processed by the ALU) by entering numbers using his keyboard/mouse (input devices), he gets the result on the screen(output device). This scenario is a typical example of processing information.

<em>Hope this helps!</em>

7 0
3 years ago
Write the half function. A function call and the functionprototype
EastWind [94]

Answer:

C code for half()

#include<stdio.h>

void half(float *pv);

int main()

{

float value=5.0;  //value is initialized  

printf ("Value before half: %4.1f\n", value); // Prints 5.0

half(&value);  // the function call takes the address of the variable.

printf("Value after half: %4.1f\n", value); // Prints 2.5

}

void half(float *pv) //In function definition pointer pv will hold the address of variable passed.

{

*pv=*pv/2;  //pointer value is accessed through * operator.

}

  • This method is called call-by-reference method.
  • Here when we call a function, we pass the address of the variable instead of passing the value of the variable.
  • The address of “value” is passed from the “half” function within main(), then in called “half” function we store the address in float pointer ‘pv.’ Now inside the half(),  we can manipulate the value pointed by pointer ‘pv’. That will reflect in the main().
  • Inside half() we write *pv=*pv/2, which means the value of variable pointed by ‘pv’ will be the half of its value, so after returning from half function value of variable “value” inside main will be 2.5.

Output:

Output is given as image.

3 0
3 years ago
Other questions:
  • Hotels and motels that are part of a ________ share a centralized reservation system and a common image, logo or advertising slo
    7·1 answer
  • A characteristic of a 3D model that a 2D model does not have is:
    8·1 answer
  • A search engine is aprogram to search......<br>​
    7·1 answer
  • Write an if-else statement for the following: If user_tickets is less than 5, assign 1 to num_tickets. Else, assign user_tickets
    15·1 answer
  • Which elements are in the Sort dialog box? Check all that apply.
    9·1 answer
  • Controlling access of information on the internet
    15·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    5·1 answer
  • What's the best item in the binding of isaac?
    13·1 answer
  • Complete the statement below with the correct term.
    12·1 answer
  • unlike the barcode-based tracking system, a radio frequency identification system offers a .
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!