Stamp collectors store all the stamps in 3 philatelic albums, store all 2/10 in book A, store all seven per cent in book B, store 303 stamps in volume C, ask the total number of stamp collectors for this collector, and how many stamps are stored in each booklet?
The programming steps are as follows:
- To create a console application
- Application header File
- Define A,B,C,X and sum as basic integral types
- The value of x is tested to meet the X value of 106050% (28-5*x) ==0, which is calculated by calculating the total number of stamps and the quantity of stamps in each album. (x stands for all seven x in book B)
- The main code of the program is as follows:
1#include <iostream>2 using namespacestd;3 4 voidMain ()5 {6 inta,b,c,x,sum;7 for(x=1; x<=5; x + +)8 {9 if(10605%( --5*x) = =0)Ten { Onesum=10605/( --5*X);//set seven X ((X/7) + (1/5)) =303/sum; AA=2*sum/Ten; -b=x*sum/7; -C=303; theprintf"Total is %d\n", sum); -printf"A:%d\n", a); -printf"b:%d\n", b); -printf"c:%d\n", c); + } - } +}
The results of the operation are as follows:
Issues with stamp collectors for the C + + language code