Write a program that asks the user for a positive nonzero integer value. The program should use
Question:
Write a program that asks the user for a positive nonzero integer value. The program should use a loop to get the sum of all the integers from 1 up to the number entered. For example, if the user enters 50, the loop will find the sum of 1, 2, 3, 4, . . . 50.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 87% (8 reviews)
include int main int ni...View the full answer
Answered By
Marvine Ekina
Marvine Ekina
Dedicated and experienced Academic Tutor with a proven track record for helping students to improve their academic performance. Adept at evaluating students and creating learning plans based on their strengths and weaknesses. Bringing forth a devotion to education and helping others to achieve their academic and life goals.
PERSONAL INFORMATION
Address: , ,
Nationality:
Driving License:
Hobbies: reading
SKILLS
????? Problem Solving Skills
????? Predictive Modeling
????? Customer Service Skills
????? Creative Problem Solving Skills
????? Strong Analytical Skills
????? Project Management Skills
????? Multitasking Skills
????? Leadership Skills
????? Curriculum Development
????? Excellent Communication Skills
????? SAT Prep
????? Knowledge of Educational Philosophies
????? Informal and Formal Assessments
0.00
0 Reviews
10+ Question Solved
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Question Posted:
Students also viewed these Computer science questions
-
Good Sports, Incorporated, is a private full-line sporting goods retailer. Assume one of the Good Sports stores reported current assets of $91,260 and its current ratio was 1.80, and then completed...
-
Write a program that asks the user for a positive integer no greater than 15. The program should then display a square on the screen using the character X. The number entered by the user will be the...
-
Write a program that asks the user for a path to a directory, then updates the names of all the files in the directory that contain the word draft to instead say final EX: "term paper (draft).txt"...
-
What are the side effects of the drugs that are used for treatment of Multiple Sclerosis attacks? Are cataracts a result of steroid use? Is osteoporosis a complication of Multiple Sclerosis?
-
Create a user-defined function to calculate the value of a common stock using the earnings model that was introduced in Chapter 8 on page 246. a. What arguments will you need to accept in order to...
-
Three children are standing on a 15 15- ft raft. If the weights of the children at points A, B, and C are 85 lb, 60 lb, and 90 lb, respectively, determine the magnitude and the point of application...
-
La Salle Exploration Company reported these figures for 2008 and 2007: Compute rate of return on total assets and rate of return on common stockholders' equity for 2008. Do these rates of return...
-
Pybus, Inc. is considering issuing bonds that will mature in 20 years with an 8 percent annual coupon rate. Their par value will be $1,000, and the interest will be paid semiannually. Pybus is hoping...
-
ompute the A recent article in the Cincinnati Enquirer reported that the mean labor cost to repair a heat pump is $90 with a standard deviation of $22. Monte's Plumbing and Heating Service com-...
-
How do you think that quality management concepts can support sustainability efforts? Find some sources or examples to support your beliefs.
-
What will the following program segments display? a) x = 2; y = x++; System.out.println(y); b) x = 2; System.out.println(x++); c) x = 2; System.out.println(--x); d) x = 8; y = x--;...
-
What will the println statement in the following program segment display? int x = 5; System.out.println(x++); a. 5 b. 6 c. 0 d. None of these
-
What is a channel of distribution? What are channel intermediaries?
-
TSLA is trading at $ 2000.00. In 1 year it can either go up to $ 3000 or down to $ 1500. If the current 1-year t-bill is yielding 0.35%, find the price of a 1year call option with an exercise price...
-
ABC Company is considering the purchase of a new machine for $64,000 installed. The machine will be depreciated by MACRS as 5 year property. The firm expects to operate the machine for 4 years and...
-
A few years ago, a total of 2690 thousand people lived in the metropolitan areas of Las Vegas, Nevada, and Sacramento, California. Sacramento had 282 thousand more residents than Las Vegas. What was...
-
A hydraulic is designed with a line that is 69 ft long. If the applied pressure at one end of the line is 29 Pa, what is the applied pressure at the other end? State the appropriate mks units with...
-
If x> 0, then (4x + 9x) 2 =
-
The data set in DS 11.1.3 concerns the infrared radiation readings from an energy source measured by a particular meter with three different background radiation levels. (a) Use the Kruskal-Wallis...
-
You are thinking of investing in one of two companies. In one annual report, the auditors opinion states that the financial statements were prepared in accordance with generally accepted accounting...
-
What will the following code display? for number in range(10, 5, 1): print(number)
-
A sleep debt represents the difference between a persons desirable and actual amount of sleep. Write a program that prompts the user to enter how many hours they slept each day over a period of seven...
-
The input operation that appears just before a validation loop is known as the __________. a. Prevalidation read b. Primordial read c. Initialization read d. Priming read
-
calculate present value factor at 10% and present values and net present value Year 0 1 2 3 4 Investment flows New equipment $(15,000) (10,080) 120 Software ($16,800 x 60%)a Old equipment ($200...
-
Compute the number of equivalent units with respect to conversion using the weighted-average method. Conversion Percent Complete Direct Materials Units Percent Complete Beginning work in process...
-
3. Enter the following matrices in MATLAB and the compute the following parts a-h. A = [ 2 B= C=1+ 5+2i 3-i; 5-2i 7 4+ 3i; 3+i 3 1+i i; 1-i 1 15+i 1-4i; 3i 3: -i 4-3i 3 1 1] 5-i 2+5i4i -3+i 2-7i] i)...
Study smarter with the SolutionInn App