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...
-
A 1.00-mol sample of air (a diatomic ideal gas) at 300 K, confined in a cylinder under a heavy piston, occupies a volume of 5.00 L. Compute the final volume of the gas after 4.40 kJ of energy is...
-
How is a work breakdown structure used in project management?
-
Show that your blood supply can carry as many as 3 10 22 molecules of oxygen. Heres some information you may find useful: You have 25 trillion red blood cells. Each red blood cell contains 300...
-
Starbucks Coffee Co. uses a data based approach to improving the quality and customer satisfaction of its products. When survey data indicated that Starbucks needed to improve its package sealing...
-
Assume X Corp creates a subsidiary, Y Corp, and invests $500,000 cash in exchange for all of the $1 par common stock (2,000 shares). What would journal entries X and Y make at the time of the...
-
Prime Corporation acquired 80 percent of Steak Companys voting shares on January 1, 20X4, for $280,000 in cash and marketable securities. At that date, the noncontrolling interest had a fair value of...
-
ABC Brokerage has a mission statement that reads: "Our mission is to create partnerships with our clients that result in thriving communities and a work environment where real estate professionals...
-
Prior to working on this discussion forum, read the article Organizational Life Cycles and Shifting Criteria of Effectiveness: Some Preliminary Evidence Download Organizational Life Cycles and...
-
1. Why has "Emotional Intelligence" transformed into a trending topic in project management? Please provide a holistic analysis to shed light on key factors that have contributed to the formation of...
-
In strategy development, once the vision, mission, values, and objectives are set, the next step is to identify strategic options. Once a strategic approach is determined, it is time to set up...
-
A firm's global operations function is focused on managing the development, production planning, sourcing, and distribution of the company's products. Consider an international firm with which you...
-
A. Why are Bo Hanson's Experiences important? B. What does starting on the same page mean to you? C. How does behavior influence team culture? Relate this to your experiences. D. How would you apply...
-
McDonald's has many restaurants around the country. Their local demand for apple pies obviously varies a bit. Let's assume that the demand (in numbers of apple pies) X is normally distributed with...
-
Why should you not model a decision variable as a random variable with a probability distribution?
-
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...
-
Read the following extract from an article about a business venture of the Bob Jane company. Is prudence still a virtue? The concept of prudence and its use, or non-use, in financial reporting has...
-
Your friend Ninette Nobis was a tourism management student when you were at university together and is now a manager of an upmarket hotel in the Exquisite Hotels chain. Because of the impact of an...
-
Transactions affecting Bradford Ltds accounts receivable for the year ended 30 June are presented below. On 1 July of the previous year, the opening balance of the Allowance for Doubtful Debts...
Study smarter with the SolutionInn App