Format the output in fixed point notation with two digits after the decimal point, even when the number is zero or has no fractional part. Omit the input validation for this program. You may assume the user input is in the valid ranges described. Remember to turn in your program listing, as well as a capture of the following program dialogs. This program calculates shipping charges for the Fast Freight Shipping Company.

Enter weight of package (in kilograms): 5.0
Enter Shipping distance (in miles): 10
The shipping charge is $2.20

This program calculates shipping charges for the Fast Freight Shipping Company.

Enter weight of package (in kilograms): 9.8
Enter Shipping distance (in miles): 2500.99
The shipping charge is $18.50

This program calculates shipping charges for the Fast Freight Shipping Company.

Enter weight of package (in kilograms): 0.3
Enter Shipping distance (in miles): 2501
The shipping charge is $6.60

This program calculates shipping charges for the Fast Freight Shipping Company.

Enter weight of package (in kilograms): 18.8
Enter Shipping distance (in miles): 736
The shipping charge is $9.60

This program calculates shipping charges for the Fast Freight Shipping Company.

Enter weight of package (in kilograms): 20
Enter Shipping distance (in miles): 3000
The shipping charge is $28.80

This program calculates shipping charges for the Fast Freight Shipping Company.

Enter weight of package (in kilograms): 0.1
Enter Shipping distance (in miles): 10
The shipping charge is $1.10

This program calculates shipping charges for the Fast Freight Shipping Company.

Enter weight of package (in kilograms): 6.0
Enter Shipping distance (in miles): 1001.0
The shipping charge is $6.60

This program calculates shipping charges for the Fast Freight Shipping Company.

Enter weight of package (in kilograms): 6.01
Enter Shipping distance (in miles): 1000.99
The shipping charge is $7.40

This program calculates shipping charges for the Fast Freight Shipping Company.

Enter weight of package (in kilograms): 2.0
Enter Shipping distance (in miles): 500.996
The shipping charge is $1.10

This program calculates shipping charges for the Fast Freight Shipping Company.

Enter weight of package (in kilograms): 2.001
Enter Shipping distance (in miles): 501
The shipping charge is $4.40

This program calculates shipping charges for the Fast Freight Shipping Company.

Enter weight of package (in kilograms): 10.0
Enter Shipping distance (in miles): 1501
The shipping charge is $14.80

This program calculates shipping charges for the Fast Freight Shipping Company.

Enter weight of package (in kilograms): 10.01
Enter Shipping distance (in miles): 1500.999
The shipping charge is $14.40

# include <iostream>
using namespace std;

int main()
{
Any can help me? give me some ideas? and guide me . Thank You

# include <iostream>
using namespace std;

int main()
{
Any can help me? give me some ideas? and guide me . Thank You

This is not an adequate effort. I'm sorry but your place of study wouldn't have sent you away with this kind of assignment only teaching you half-done simple syntax..

Maybe this will help :

#include<iostream>
using namespace std;

int main()
{
   float pi = 3.141579;
   cout.precision(5); //set precision to output
   cout << pi << endl;
   cout.precision(3);
   cout<<pi<<endl;
  
  return 0;
}
This article has been dead for over six months. Start a new discussion instead.