what is the out of both program #include using namespace std; void swap(double&, double&); int main() {
Fantastic news! We've Found the answer you've been seeking!
Question:
what is the out of both program
Transcribed Image Text:
#include <iostream> using namespace std; void swap(double&, double&); int main() { double grades[]-[3.4.5.6,7.8,3.2,1.3,7.6,3.9); for (int i=0;i<6;i++) { } for (int j=i+1;j<7:j++) { if (grades [i]<grades[j]) swap(grades[i].grades[j]); } for (i=0; i<7; i++) cout << "" << grades[i]; cout <<endl; return 0; } void swap (double&a, double& b) { double temp= a; a=b; b=temp; } int a, b; float x; a = 4; b = 7; do { num = a; while (num <= b) { for (k-a; k <= b; ++k) cout <<setw(4) << num; cout << endl; num++; } cout <<endl; a++; } while (a != b); #include <iostream> using namespace std; void swap(double&, double&); int main() { double grades[]-[3.4.5.6,7.8,3.2,1.3,7.6,3.9); for (int i=0;i<6;i++) { } for (int j=i+1;j<7:j++) { if (grades [i]<grades[j]) swap(grades[i].grades[j]); } for (i=0; i<7; i++) cout << "" << grades[i]; cout <<endl; return 0; } void swap (double&a, double& b) { double temp= a; a=b; b=temp; } int a, b; float x; a = 4; b = 7; do { num = a; while (num <= b) { for (k-a; k <= b; ++k) cout <<setw(4) << num; cout << endl; num++; } cout <<endl; a++; } while (a != b);
Expert Answer:
Answer rating: 100% (QA)
The image contains two separate C code snippets One snippet is a sorting algorithm to sort an array ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
9.1 Exercise (JDK Source Code): Extract the source code of the class Math from the JDK source code ("$JAVA_HOME" "src.zip" "Math.java" under folder "java.lang"). Study how constants such as E and...
-
. A vertical pole that is 2 meters tall casts a shadow that is 1.5 meters long. Nearby, at the same time, another vertical pole casts a shadow that is 6.5 meters long. How tall is this pole? a. Make...
-
Why due diligence, both legal and financial, is important for the song catalog purchase? Why it is important to understand the details of sources of income, how and when it is earned, and how it is...
-
The stockholders' equity accounts of Whispering Company have the following balances on December 31, 2025. Common stock, $10 par, 304,000 shares issued and outstanding $3,040,000 Paid-in capital in...
-
Quick Networking Systems adjusts and closes its books and then prepares financial statements monthly. Quick uses the perpetual inventory system. The company completed the following transactions...
-
The number of years can reflect delaying depositing money. 40 years would be depositing money at the start of a 40 -year career. 35 years would be waiting 5 years before depositing the money. Thirty...
-
Mastercraft Inc. makes a variety of motordriven products for the home and small businesses. The market research department recently identified power lawn mowers as a potentially lucrative market. As...
-
Brandt Company presents the following December 31, 2013, balance sheet: The following information is also available: 1. Current assets include cash, $3,800; accounts receivable, $18,500; notes...
-
Question 1 (20 marks) a) A foreign operation harvests pineapples that are shipped to Australia for processing at the Australian parent entity's canning facility. All senior personnel at the foreign...
-
You are to develop a simple Binary Search Tree ADT and run it against a test program. Avoid the temptation of finding code online. I am aware of all the available solutions and will be looking...
-
Bright Books is a bookstore chain established 10 years ago in northern Michigan. Bright Books has had great success in Michigan and Ohio and is beginning to expand into other states. Most recently,...
-
Monty Inc. had service revenue of $742000, operating expenses of $396000, and interest expense of $28800 for the year ended December 31, 2024. The company has a 30% income tax rate. Assuming Monty...
-
The owner of Britten's Egg Farm wants to estimate the mean number of eggs laid per chicken. A sample of 16 chickens shows they laid an average of 18 eggs per month with a standard deviation of 5 eggs...
-
a. Benefits for employees are forms of payment other than a salary or hourly wage. The following are just a few examples of specific employee benefits: paid time off, health insurance, tuition...
-
A producer of door frame chin-up bars has determined that the revenue from the production and sale of x units is given by R(x)=50x0.04x2 dollars, where 0x1000 . For what interval of production is the...
-
Valber Company is considering eliminating its Phone division. The company allocates fixed costs based on sales. If the Phone division is dropped, all of its variable costs are avoidable, and $158,000...
-
Exam Content The Stanford Prison Experiment is one of the most well-known psychological experiments in history. The results of the experiment were shocking. In this assignment, you will focus more on...
-
1A. If the researcher is concerned about the number of variables, the nature of the analysis, and completion rates, then, he/she is at which stage of the sampling design process (Figure 11.1 in the...
-
Rewrite the code from Pencil and Paper Exercises 1 and 2 so that the getProduct function receives two integers, a double number, and the address of a double variable from the calling statement. The...
-
Using the switch statement, write the C++ code that corresponds to the partial flowchart shown in Figure 6-36. Use a char variable named code and a double variable named rate.
-
In this exercise, you will experiment with passing variables by value and by reference. a. Follow the instructions for starting C++ and viewing the TryThis9.cpp file, which is contained in either the...
-
Lieberman Clothing Company manufactures its own designed and labeled sports attire and sells its products through catalog sales and retail outlets. While Lieberman has for years used activity-based...
-
Alpha-Alpha Inc. produces meat products. Suppose one of the companys plants processes beef cattle into various products. For simplicity, assume that there are only three productssteak, hamburger, and...
-
A cable television network is considering cancelling the program Law and Order because it is watched by only 2.3 percent of the audience in its Monday evening time slot. It would be replaced by...
Study smarter with the SolutionInn App