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
How does digital and hybrid computers differ in portability​
tatiyna

Answer:

Digital computers perform functions like mathimatical,compex calculations. while hybrid computers work with the duo combinations like analog and tempature.

Explanation:

I passed the class A+

yourwelcome :)

thank me if it was correct for you too.

5 0
2 years ago
What is the purpose of extent in lines in engineering drawing
Blizzard [7]

Answer:

Extension lines are used to indicate the extension of a surface or point to a location preferably outside the part outline.

Explanation:

7 0
2 years ago
Which guideline should you follow when selecting the font for a presentation
Sladkaya [172]
My school requires us to use Arial and double space it but we have to use font size 30 for title and 24 for the paragraphs.
3 0
3 years ago
SI TENGO: ¿R = 255, G0 =, B = 0, QUE COLOR OBTENGO?
Ymorist [56]

Answer:

Rojo

Explanation:

No, valores de otros colores 255 para rojo. Esto conducirá al color rojo.

5 0
3 years ago
Write a recursive function that takes a non-negative integer as an argument and displays the same number in reverse order (i.e.
avanturin [10]

Answer:

Following are the program in C++ language

#include<iostream> // header file

using namespace std; // namespace std

int reverse(int n1); // function prototype

int main()  // main function()

{

   int num; // Variable declaration

   cout << "Enter the number" << endl;

   cin >> num; // Read the number bu the user

  cout<<"After Reverse the digit:\n";

   int res= reverse(num); // calling function reverse

   

   cout<<res; // display  

}

int reverse(int n1) // function definition of reverse

{

   if (n1<10)  // checking the base condition

       {

           return n1;

       }

   else

       {

           cout << n1 % 10; // Printed the last digit

          return reverse(n1/10); // calling itsself

}

}

Output:

Enter the number:

76538

After Reverse the digit:

83567

Explanation:

Following are the description of the program

  • In the main function read the number by user in the "num" variable of int type.
  • Calling the reverse and pass that "num" variable into it.
  • After calling the control moves to the body of the reverse function.In this function we check the two condition

        1  base condition

   if (n1<10)  // checking the base condition

       {

           return n1;

     }

      2  General condition

  else

       {

           cout << n1 % 10; // Printed the last digit

          return reverse(n1/10); // calling itsself

       }

  • Finally return the reverse number and display them into the main function.
5 0
3 years ago
Other questions:
  • What is the function of series-parallel circuit
    9·1 answer
  • A ____ is text and graphics that print at the bottom of every page.
    12·1 answer
  • When Amy turns on her computer, she notices a burning smell. Smoke comes out of the case, and Amy immediately turns off her comp
    7·1 answer
  • Store programming components in the shared folder. you want to secure the data in the folder as follows: members of the research
    11·1 answer
  • ​Suppose your computer network was compromised in a large scale virus attack last Thursday. Most of the data files got corrupted
    8·1 answer
  • What is alfred anderson in creole?
    6·1 answer
  • question i need a real answer cuase i have a virus cuase off my borther and these are the notifacations i get and now these site
    11·1 answer
  • The costs incurred when a firm buys on the marketplace what it cannot make itself are referred to as
    6·1 answer
  • Using complete sentences post a detailed response to the following.
    13·1 answer
  • A. Get a value for x from the user.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!