May 2021 2 75 Report
A C++ Program helpppppppp!?

Honestly, I don't even know where to begin. I've searched the whole internet for clues and my lecturer's notes are a joke and i'm seriously so desperate right now! If anyone could help at all i'd really appreciate it, even to get it started pleaseeeeeee. This is what i've been asked to do:

Write a program that:

•1) Creates an array containing 100 random double numbers in the [0,250) range;

•2) Sorts them in descending order;

•3) Prints the contents of the sorted vector out. The sorting should be coded as a separate function double* sort_array(double* ).

Even if I could do the first two points, that'd be something.

#include <iostream>

#include <cstdlib>

#include <ctime>

int main()

{

int number;

I don't even have a clue what to write after that; i'm presuming there's some double random() function or something

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 QUIZLS.COM - All rights reserved.