Sam and Ella's Delicatessen Wants You To Write A Program To Take Orders From The
Sam and Ella's Delicatessen Wants You To Write A Program To Take Orders From The
for the current year, also encoded as two digits (like "99"). The program is to correctly
write out the users age in years.
Year of Birth:
62
Current year:
99
Your age: 37
During a special sale at a store, a 10% discount is taken on purchases over $10.00. Write
a program that asks for the amount of purchases, then calculates the discounted price. The
purchase amount will be input in cents (as an integer):
Enter amount of purchases:
2000
Discounted price: 1800
Use integer arithmetic throughout the program.
======================================================
Sam and Ella's Delicatessen wants you to write a program to take orders from the
Internet. Your program asks for the item, its price, and if overnight shipping is wanted.
Regular shipping for items under $10 is $2.00; for items $10 or more shipping is $3.00.
For overnight delivery add $5.00.
Enter the item:
Tuna Salad
Enter the price:
450
Overnight delivery (0==no, 1==yes)
1
Invoice:
Tuna Salad 4.50
shipping 7.00
total 11.50
(Use our ordinary IO methods. A real Internet order form would use different I/O methods, but ignore this.)
Write a program that computes the following sum:
sum = 1.0/1 + 1.0/2 + 1.0/3 + 1.0/4 + 1.0/5 + .... + 1.0/N
N will be an integer limit that the user enters.
Enter N
4