A PC store sells many types of computers. The PC can have either 16 or 8 gigabytes of memory.
The quality of the PCs can be either New, Refurbished, or Dented.
The price list is given as follows:
Memory size/Status New Refurbished Dented
16 gigabytes 849.99 729.99 609.99
8 gigabytes 699.99 579.99 439.99
Determine the price of a given PC dependent on the user inputs. The sale tax is 9.25% for each PC.
User input can only be 8 or 16 for memory size and 'N', 'R', or 'D' for quality (upper-case). The input quantityt should be 0 or positive.
If any user input is not correct, display an error message and skip all calculation.
All currency amount should be displayed with 2 digits in decimal fraction.
Here are several separate program sample runs. There is No need to use loop for repetition.
Enter the memory size of the PC (8 or 16 gigabytes): 16
Enter the quality of the PC (N for New, R for Refurbished, or D for Dented): N
Enter PC quantity want to buy: 2
The item price is $1699.98
The sale tax is $157.25
The total bill is $1,857.23
----------------------
Enter the memory size of the PC (8 or 16 gigabytes): 8
Enter the quality of the PC (N for New, R for Refurbished, or D for Dented): R
Enter PC quantity want to buy: 3
The item price is $1739.97
The sale tax is $160.95
The total bill is $1900.92
----------------------
Enter the memory size of the PC (8 or 16 gigabytes): 15
Invalid memory size!
----------------------
Enter the memory size of the PC (8 or 16 gigabytes): 8
Enter the quality of the PC (N for New, R for Refurbished, or D for Dented): A
Invalid PC quality!
----------------------
Enter the memory size of the PC (8 or 16 gigabytes): 8
Enter the quality of the PC (N for New, R for Refurbished, or D for Dented): (user hit Tab key)
Invalid PC quality!
----------------------
Enter the memory size of the PC (8 or 16 gigabytes): 16
Enter the quality of the PC (N for New, R for Refurbished, or D for Dented): R
Enter PC quantity want to buy: -2
Invalid PC quantity!
[C++ PROGRAMING]
In: Computer Science
Determine Kc for the reaction (justify all your calculations):
½ N2(g) + ½ O2(g) + ½ Br2(g) NOBr(g)
From the following information at T=298 K
2NO(g) O2(g) + N2(g) Kc = 2.1 x 10^30
NO(g) + ½ Br2(g) NOBr(g) Kc = 1.4
In: Chemistry
What is the molality of a solution that has been prepared by mixing 53.6 g of sodium chloride with 464 g of water?
In: Chemistry
1) A 150.0 mL solution was prepared by mixing 100.0 mL of 1.00 M HONO (Ka = 4.5 x 10–4 ) with 50.0 mL of 1.00 M NaNO2 . Calculate the pH, [HONO], and [NO2–], once equilibrium has been established.
2). What is the pH, [OH–], [HF], [F–], and the percent ionization of a solution prepared as 0.50 M HF ? (HF: Ka = 7.2 x 10-4)
50 M HF ? (HF: Ka = 7.2 x 10-4)
3. Consider the reaction:
CO(g) + H2O(g) CO2(g) + H2(g)
At 800 K the equilibrium constant, K = 16.
If your reaction vessel initially contains 0.050 M CO, 0.050 M H2O, 0.30 M CO2 and 0.30 M H2. What are the equilibrium concentrations of all of the components?
4. What is the pH of a saturated solution of Mn(OH)2 ( Ksp = 2.0 x 10–13)?
Mn(OH)2 (s) Mn2+ (aq) + 2 OH-(aq)
5) The weakest strong acids is Nitric acid, with a Ka = 240. The % ionizations of strong acids are rounded off to 100%. Calculate the % ionization of 0.100 M nitric acid without rounding.
In: Chemistry
Why is good documentation important in your research reports? Explain why recommendations should be specific and actionable. Provide at least two examples of recommendations that meet this standard.
In: Economics
In: Economics
Simulate a D-Flip Flop on Xilinx using Verilog HDL | Behavioral Modelling
PS: please include the simulation screenshot and output and the code
In: Computer Science
please write a paper that argues either for or against government intervention in foreign trade. Describe both the benefits and the problems that can occur when governments interfere with foreign trade, describing the different barriers that governments can impose and also the steps they sometimes take to encourage international trade.
In: Economics
What is the current thinking on the little hierarchy problem in light of a potential Higgs mass above 120 GeV? A few years ago, at least, I remember various phenomenologists saying that this at least makes life rather difficult for the MSSM.
In: Physics
In: Other
Goldstein's Classical Mechanics has a puzzling few sentences in his discussion of orbits.
Referring to the case of orbit where the energy is low enough for the orbit to be bounded, he says :"This does not necessarily mean that the orbits are closed. All that can be said is that they are bounded, contained between two circles of radii r1 and r2 with turning points always lying on the circles."
Doesn't "bounded" automatically mean "closed"? The object cannot escape from the attractive force and hence returns over and over. At least, that is my understanding of the terms. Wikipedia says "The orbit can be open (so the object never returns) or closed (returning), depending on the total energy (kinetic + potential energy) of the system." But it also says "Orbiting bodies in closed orbits repeat their paths after a constant period of time." So the only way out I see is if a closed orbit is a special case of non-precessing bounded orbit.
In: Physics
In regards to the monitoring of employee electronic activities by employers and the implications of that monitoring;
Does employee monitoring lead to higher employee productivity? How does employee monitoring impact personal privacy?
Please thoroughly explain your response, giving examples to each point you make.
In: Psychology
13). Jack Daniels is expanding his family-run beer distributorship into Georgia or Tennessee. His parents began the business many years ago and now three generations of Daniels work in the family business. Jack will relocate the entire family (his parents, spouse, children, etc.) to either state after the move. What types of taxes may influence his decision of where to locate his business? What non-tax factors may influence the decision?
In: Economics
A continuous series of cash flows totaling $2,500 per year are made to a fund paying 9 percent compounded continuously.
A What will the fund amount to after 5 years? $
B What is the present worth equivalent of the total set of payments? $
In: Economics
6. A. An isotope with atomic number 84 and mass number 212 emits an alpha particle. what are the atomic number and mass number of the resultant atom?
B. An atom of atomic number 48 with a mass number of 113 emits A beta particle. What are the new atomic and mass numbers ?
7. Why does the pH change when CO2 dissolves in water ?
8. The 32 isotope of phosphorus has a half life of 14.3 days. How
long will It take for a sample of 100g to decay to 12.5g of
phosphorus?
9. The maximum legal limit of arsenic in water is 0.0500ppm (parts per million) for drinking water. Is water with 8.00x10-6 moles of As per liter suitable for drinking ? Show how you arrive at your answer.
10. How many grams of NaOH are in 2.00 liters of a 0.255molar solution ?
In: Chemistry