1. Write a program to calculate approximate value of e, with following equation, input the value...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Write a program to calculate approximate value of e, with following equation, input the value of n from the keyboard, e=1+1/1!+1/2+1/3+...1/n!. Keep 4 digits after the decimal point. 2. Input the scores of two courses which are JAVA and Mathematics from the keyboard, and output the corresponding level for both courses according to the following grading system: score: level 0-59: E, 60-69: D, 70-79: C, 80-89: B, 90-100: A 3. Print all the "narcissus numbers" in the range of 100-1000. The so-called "narcissus number" refers to a three-digit number, whose cube sum equals the number itself. For example, 153 is a "narcissus number" because 1^3 +5^3 + 3^3 = 153. 1. Write a program to calculate approximate value of e, with following equation, input the value of n from the keyboard, e=1+1/1!+1/2+1/3+...1/n!. Keep 4 digits after the decimal point. 2. Input the scores of two courses which are JAVA and Mathematics from the keyboard, and output the corresponding level for both courses according to the following grading system: score: level 0-59: E, 60-69: D, 70-79: C, 80-89: B, 90-100: A 3. Print all the "narcissus numbers" in the range of 100-1000. The so-called "narcissus number" refers to a three-digit number, whose cube sum equals the number itself. For example, 153 is a "narcissus number" because 1^3 +5^3 + 3^3 = 153.
Expert Answer:
Answer rating: 100% (QA)
1 Calculate the approximate value of e n intinputEnter the value of n ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
1. Operation 3: Change the second equation by adding to it (- 1/2) times the first equation. 2. Operation 3: Change the third equation by adding to it (-4) times the first equation. 3. Operation 3:...
-
Hanmi Group, a consumer electronics conglomerate, is reviewing its annual budget in wireless technology. It is considering investments in three different technologies to develop wireless...
-
[Related to the Making the Connection] An article in the New York Times observed that "the Glass-Steagall Act... forced the separation of investment banking from commercial banking..." And:...
-
Engineers observe that about 90% of graphite samples fracture within five hours when subjected to a certain stress. (a) If the time to fracture is modeled with an exponential distribution, what would...
-
Mary Stahley invested $2500 in a 36-month certificate of deposit (CD) that earned 8.5% annual simple interest. When the CD matured, she invested the full amount in a mutual fund that had an annual...
-
Genuine Spice Inc. began operations on January 1, 2014. The company produces a hand and body lotion in an eight-ounce bottle called Eternal Beauty. The lotion is sold whole-sale in 12-bottle cases...
-
Explain what kinds of problems the Copycat architecture can solve.
-
Quality improvement relevant costs, and relevant revenues. The Tan Corporation uses multicolor molding to make plastic lamps. The molding operation has a capacity of 200,000 units per year. The...
-
Simplify the expression, if possible. (If the solution is not a real number, enter NOT REAL.) 2162/3
-
In the Reddy Mikks model of Example 2.2-1; (a) Determine the range for the ratio of the unit revenue of exterior paint to the unit revenue of interior paint. (b) If the revenue per ton of exterior...
-
The compound manganese(II) acetate, Mn(CH3COO)2 is soluble in water. Write the net ionic equation for the dissociation reaction that occurs when solid manganese(II) acetate dissolves in water: Use...
-
Considering the very varied nature of the different audits and reviews that can be carried out, is it likely that these can be done at one time by one person?
-
Supply chains are complex and can involve many parties. How might you factor in emergencies such as pandemics into your choices of suppliers?
-
Show the activities that must be completed during the final phases of a project.
-
A beam of length \(L\), loaded in bending, must support a specified bending moment \(M\) without failing and be as light as possible. Show that to minimize the mass of the beam per unit length, \(m /...
-
How is the Internet changing the role of the purchasing function? Carry out a search of software vendors and investigate the kinds of features that are being offered here. What are the possible...
-
At 3 PM, two ships started sailing toward each other from ports which were 265 mies apart at average rates of 15 and 23 mles per hour. At what time were the ships stil 60 miles apart?
-
The outer loop controls the number of students. Note that the inner loop of this program is always executed exactly three times, once for each day of the long weekend. Modify the code so that the...
-
In Problems 1122, graph each inequality. x 4
-
In Problems 1526, find the domain of each rational function. H(x) = 3x + x x +9 2
-
In Problems 3760, graph each function using the techniques of shifting, compressing, stretching, and/or reflecting. Start with the graph of the basic function (for example, y = x 2 ) and show all the...
-
A mass attached to a linear spring sliding on a surface with Coulomb damping is an example of a nonlinear system. Indicate whether the statement presented is true or false. If true, state why. If...
-
The swinging spring is an example of a two degree-of-freedom system with a cubic nonlinearity. Indicate whether the statement presented is true or false. If true, state why. If false, rewrite the...
-
The convolution integral can be applied to solve nonlinear problems. Indicate whether the statement presented is true or false. If true, state why. If false, rewrite the statement to make it true.
Study smarter with the SolutionInn App