Posted by DJ on Monday, December 3, 2012 at 10:26am.
here's some perl. Modify to suit your needs:
@cost = (0.00,0.00,20.00,50.00,75.00);
@ship = (0.00,2.95,3.95,4.95,0.00);
while (1) {
print "Enter order amount: \$";
$c = <STDIN>;
for ($i = $#cost ; $i > 0 ; $i--) {
last if $c >= $cost[$i];
}
printf "Shipping: \$%4.2f\n",$ship[$i];
}
My teacher said this is not the right. Were doing Raptor Program.
Related Questions
Programming Languages (Computer Logic and Design) - Create a program that ...
Programming Languages (Computer Logic and Design) - Create a program that ...
programming - How do i Create a program that determine the shipping cost for an ...
Computer (Programming Logic and Design) - How do i Create a program that ...
Programming - Create a program that determine the shipping cost for an order ...
Programming Logic - Create a program that determine the shipping cost for an ...
programming (using raptor) - Create a program that determine the shipping cost ...
Shipping Cost Program (Raptor) - Create a program that determine the shipping ...
Computer Science (Programming Logic And Design) - How do i Create a program that...
Programing using Raptor ( Computer Logic) - Create a program that determine the ...
For Further Reading