subject

Hi guys i have a vector with 9 elements vec[20]= 80.59 , 132.40, 81.85, 79.83, 119.96, 111.89, 110.99, 101.21, 118.53 im trying to put them in an anscending orderthats what the console shows me: 80.59 79.83 81.85 101.21 110.99 111.89 118.53 119.96 132.40 for(k=1; k< =i-1; k++) { for(j=k+1; j { if(vec[k]> vec[j]) { aux=vec[k]; vec[k]=vec[j]; vec[j]=aux; } } } up is the formule i used but it is not working. what should i do? i am working in c programming.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:00
Speed is how fast an object moves a certain distance within a length of time. how is speed calculated? a) distance/time b) time/distance c) velocity/time d) distance x time
Answers: 1
question
Computers and Technology, 22.06.2019 00:00
11. is the ability to understand how another person is feeling. a. authority b. sympathy c. empathy d. taking a stand
Answers: 1
question
Computers and Technology, 23.06.2019 10:50
The volume v and paper surface area a of a conical paper cup are given by where r is the radius of the base of the cone and h is the height of the cone. a. by eliminating h, obtain the expression for a as a function of r and v. b. create a user-de ned function that accepts r as the only argument and computes a for a given value of v. declare v to be global within the function. c. for v ! 10 in.3 , use the function with the fminbnd function to compute the value of r that minimizes the area a. what is the corresponding value of the height h? investigate the sensitivity of the solution by plotting v versus r. how much can r vary about its optimal value before the area increases 10 percent above its minimum value?
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
2. fluorine and chlorine molecules are blamed fora trapping the sun's energyob forming acid rainoc producing smogod destroying ozone molecules
Answers: 2
You know the right answer?
Hi guys i have a vector with 9 elements vec[20]= 80.59 , 132.40, 81.85, 79.83, 119.96, 111.89, 110.9...
Questions
question
English, 16.06.2021 16:00
question
Physics, 16.06.2021 16:00
question
Mathematics, 16.06.2021 16:00
question
Mathematics, 16.06.2021 16:00
question
Mathematics, 16.06.2021 16:00
question
Mathematics, 16.06.2021 16:00
question
Mathematics, 16.06.2021 16:00
Questions on the website: 13722367