entry point of the console application. //#include"stdafx.h"#include"iostream"using namespacestd;intMain () {intb//define the number of books purchased intM,n; inti; Doublesum=0; cout"Please enter the number of books you need to purchase:"Endl; CIN>>b; M=b/5; N=b%5; I=n+5; if(i!=8) { Switch(n) { Case 0: Sum=m* +*0.75; Break; Case 1: Sum=m* +*0.75+8; Break; Case 2: Sum=m* +*0.75+ -*0.95; Break; Case 3: Sum=m* +*0.75+ -*0.9; Break; Case 4: Sum=m* +*0.75+ +*0.8; Break; } }
First, the topicBookstore for the "Harry Potter" series of books for promotional activities, a total of 5 volumes, with numbers 0, 1, 2, 3, 4, a single volume of 8 yuan, the specific discount is as follows:Discount on this number2 5%3 10%4 20%5 25%Depending on the number of volumes purchased and this number, different discount rules will be applicable. The singular book only corresponds to one discount rule, for example, two volume 1, one volume 2, yo
1. Title:Bookstore for the "Harry Potter" series of books for promotional activities, a total of 5 volumes, with numbers 0, 1, 2, 3, 4, a single volume of 8 yuan, the specific discount is as follows:Discount 2 of 5%3 10%4 20%5 25%Depending on the number of volumes purchased and this number, different discount rules will be applicable. The singular book only corresponds to one discount rule, for example, two volume 1, one volume 2, you can enjoy 5% dis
I choose the book "Dream Break Code";I plan to read this book carefully in 1-5 weeks, a total of 12 chapters, and I'll divide it into three parts for reading.Part I: Chapter 0-2 reading time 3.5-3.12 day, and after reading to publish reading notesPart II: Chapter 3-9 reading time 3.13-3.27 day, and after reading to publish reading notesPart III: Chapter 10-11 reading time 3.28-4.4 day, and after reading to
Reading, I remember the freedom of leisure things.One afternoon on the balcony, a cup of strong tea, leaning on the chair, holding up the book.As a matter of fact, I did do it in winter vacation.Perhaps the scene is not so romantic, perhaps the tea is not so good to drink, perhaps the book, is my interest.Back to school, continue to the era of Wang Xiaobo's outpouring.Individuals do not like e-books, especially the TN screen TFT or IPs and the like. T
Train of thought: only 8 This number special, 3+5>4+4, other as long as except 5 take surplus can.I stole a lazy, directly listed if ...#include using namespacestd;voidMain () {intN; inti; cout"Please enter this number:"Endl; CIN>>N; I= n/5; if(n5) { if(n==1) cout"Lowest Price is $8"Endl; if(n==2) cout"Lowest Price is"8*0.95"Yuan"Endl; if(n==3) cout"Lowest Price is"8*0.9"Yuan"Endl; if(n==4) cout"Lowest Price is"8*0.8"Yuan"Endl; } Else { if(n%5==0) {cout"set of 5 copies of
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.