• Need help with writing an algorithm: • Department Store Sale! Prompt the user to enter the sticker price of each of the clothing items they’re purchasing (make sure all input prices are positive). The user should be allowed to purchase as many items as he or she would like. For each individual item, the user should input whether the item is a White Tag (regular price), Blue Tag (25% off), Orange Tag (50% • off), or Red Tag (75% off) item. Output the final bill, including tax. • I'm new to this. • • Main () • Declare Tax_Price as Real • Declare Final_Price as Real • Declare Discount as Real • Declare Item_Price as Real • Display “Please enter the item price” • Input Item_Price • Display “Please enter discount as decimal”
Jump to Post
Numeric input example (works with C or C++):
// a function to clean up the input of a real number #include <stdio.h> // in/out function header #include <ctype.h> // for isdigit() #include <string.h> // for strlen() #define EOS 0 // end of string marker double real_in(void); int …
All 2 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.