Calculate and write the running time of the below code. #include void main() { } int...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Calculate and write the running time of the below code. #include <iostream> void main() { } int n=0, sum=0; cout<<"Ener positive integer"; cin>>n; for(int i=0;i<=n;i++) sum=sum+i; cout>>" Sum="<<sum; Answer: Calculate and write the running time of the below code. #include <iostream> void main() { } int n=0, sum=0; cout<<"Ener positive integer"; cin>>n; for(int i=0;i<=n;i++) sum=sum+i; cout>>" Sum="<<sum; Answer:
Expert Answer:
Related Book For
Posted Date:
Students also viewed these computer network questions
-
The gas phase conversion of A to B, AB is thought to proceed in one of two ways. The first being unimolecular and gives a first order reaction. The second, being bimolecular giving a second order...
-
The site http://virtualpiano.net features an online player piano. If you click on the Key Assist menu just above the piano keyboard, and then Keyboard Keys, you will see that each key is labelled...
-
Convert decimal + 49 and + 29 to binary, using the signed-2's-complement representation and enough digits to accommodate the numbers. Then perform the binary equivalent of ( +29) + (-49), (-29) +...
-
While exploring a castle, Exena the Exterminator is spotted by a dragon that chases her down a hallway. Exena runs into a room and attempts to swing the heavy door shut before the dragon gets he &...
-
From the trial balance of Grace Lantz, Barrister and Solicitor of Winnipeg, prepare a. An income statement for the month of May. b. A statement of owners equity for the month ended May 31. c. A...
-
The plaintiff, Thelma Agnes Smith, lived with the defendant out of wedlock for several years. When the relationship ended, she sued the defendant, seeking to enforce two written agreements with him...
-
The post-closing trial balance of Russo Corporation at December 31, 2014, contains the following stockholders equity accounts. Preferred Stock (15,000 shares issued) ........... $ 750,000 Common...
-
ony purchased an empty office building in London from Margot, an unconnected third party, on 1 September 2024. Tony paid 996,000 for the office building. No VAT was charged on the supply. Margot had...
-
Answer true or false to each of the following. Briefly explain your reasoning for each answer. a. If a company gets into financial difficulty, it can use some of its shareholders equity to pay its...
-
A company is considering the acquisition of production equipment which will reduce both labor and material costs. The cost is $100,000 and it will be depreciated on a straight-line basis to $20,000...
-
The questions below should be calculated based on the following assumptions (which will be the same for questions 14-17) : The band Thrice consists of four members: Dustin Kensrue, Teppei Teranishi,...
-
The 80/20 principle in fashion means that: Group of answer choices 80% of your sales will be the most important product the smallest portion of product styles will lead to the largest portion of...
-
DomCo, a domestic corporation, is a wholly-owned subsidiary of its Japanese parent corporation, ASIAco, which manufactures lightbulbs. During the current year, DomCo pays $100 million for 100 million...
-
Use these materials: Use the "Sources of Law" section of the Lau & Johnson (pages. 14-22) This is the website for "Sources of Law"...
-
1. What would I find on a job-cost sheet; please give examples? 2. In your own words explain to your classmates what Job Costing is. 3. Explain a job-order costing system and give examples? 4. What...
-
2. (3.5 points) Read the following article, focusing on the registry keys it describes (e.g., Run, RunOnce, etc):...
-
What are the key elements of a system investigation report?
-
In this exercise, you will modify the program from Lab 7-2 in Chapter 7. If necessary, create a new project named Intermediate16 Project, and save it in the Cpp8\Chap08 folder. Copy the instructions...
-
Complete a desk-check table for the code shown in Figure 7-48. What will the code display on the computer screen? What value stops the loop? int num = 6; while (num >= 0) { cout > Figure 7-48
-
Complete TRY THIS Exercise 1, and then modify the code so that the true path displays Not equal and the false path displays Equal.
-
Wagons and Wheels Ltd is a farm machinery dealership. In recent years, the company has experienced unsatisfactory profit results because of declining sales in the area. At the suggestion of the...
-
Quick Brekkie Ltd is evaluating three comparable investments. Summary data for the three investments, each of which would be paid for in current dollars, are listed below. Required Rank the three...
-
Phone Screens and Computer Screens are two divisions operated as investment centres of Siciliano Ltd. Management wants to know which of the two earned the highest return on investment for the year...
Study smarter with the SolutionInn App