Skip to content
Sign upLog in
← Back to Community

Edhesive Assignment 5 help

Profile icon
jedifan65

So my code manages to run every sample run correctly except for sample run 4 which has it as a decreasing array instead of an unsorted array:
Sample Run 1
How long do you want the array?
3
Enter a number
1.3
Enter a number
1.5
Enter a number
8.1
Your array is {1.3, 1.5, 8.1}
The average is 3.633333333333333
The range is 6.8
The array is sorted in increasing order

Sample Run 2
How long do you want the array?
-3
Not a valid length!

Sample Run 3
How long do you want the array?
2
Enter a number
3.6
Enter a number
0.8
Your array is {3.6, 0.8}
The average is 2.2
The range is 2.8
The array is sorted in decreasing order

Sample Run 4
How long do you want the array?
5
Enter a number
2.0
Enter a number
4.1
Enter a number
6.4
Enter a number
0.2
Enter a number
1.3
Your array is {2.0, 4.1, 6.4, 0.2, 1.3}
The average is 2.8
The range is 6.2
The array is unsorted

Here's my code:https://repl.it/@jedifan65/assignment-5-array-statistics
Please help me. This assignment is due today.
EDIT: Please help

Voters
Profile icon
TrinaYang
Profile icon
esafe
Profile icon
jedifan65
Comments
hotnewtop
Profile icon
AllAwesome497

Instead of pasting the code here, link the repl to the post. Dong so not only makes it readable, but it also lets us see firsthand and easily fork+edit it, so that we can better help you.

Profile icon
jedifan65

@AllAwesome497
Sorry about that. I'm new to this website, so forgive me for not being clear about everything. https://repl.it/@jedifan65/assignment-5-array-statistics

Profile icon
AllAwesome497

@jedifan65
No worries.

Profile icon
AshutoshRanjan6

Genuine & trusted Delhi escorts provider incall & outcall all vip hotel service. We provide call girls in Delhi on cheap rate. Open 24x7 hours Call me +91-9711857079,
Call girl in Delhi,russian escorts in Delhi,<a href="https://niharikasharma.in/"hotel escorts in Delhi,aerocity escorts,escorts in aerocity,russian escorts in delhi

Profile icon
jeefma

Also would be helpful to let us know the assignment as well since trying to piece your assignment together from the code kinda isn't fun

Profile icon
jedifan65

@jeefma
Sorry about that. Here's the assignment details: Instructions
For this assignment, you will write a program which creates an array of decimal numbers from a user's input, then returns some simple statistics about the array.

The program should first ask the user how long they wish the array to be (must be a positive integer). If the user enters a non-positive integer then the program should display "Not a valid length!", then stop. Otherwise, the program should create an array of this length, then prompt the user to enter double values one at a time, filling the array from the start with the user's inputs until the array is full.

Once the array is filled the program should print the numbers in the array, followed by the average (arithmetic mean) of the values, the range of the values, and a statement on whether the array is sorted in increasing order, decreasing order or neither.

The average of the values is found by dividing the sum of the numbers by the amount of numbers in the array (note: this may cause roundoff errors, which you do not need to worry about for this assignment).
The range of the numbers is found by subtracting the smallest number in the array from the largest number in the array.
The array is sorted in increasing order if every number is greater than or equal to the previous number. The array is sorted in decreasing order if every element is less than or equal to the previous number. If neither of these is true then the list is unsorted. If every element on the list is the same, then it is counted as being in increasing order.

Profile icon
elmira2
Profile icon
elmira2

استفاده از vpn برای باز کردن سایت های فیلتر شده

خرید VPN برای بازی های آنلاین

استفاده از VPN برای بانکداری آنلاین

آموزش تغییر آی پی با استفاده از vpn

رفع خطای پروکسی نت فلیکس با استفاده از VPN

نحوه دریافت آدرس IP آمریکا

باز کردن سایت Sky Sports با خرید VPN

جلوگیری از هک شدن تلفن هوشمند

رمزنگاری اینترنت با خرید VPN

رفع محدودیت Amazon Prime با استفاده از VPN

استفاده از vpn برای جلوگیری از هک شدن

برترین سرویس های ایمیل رمزنگاری شده

رفع تحریم و محدودیت بازی های با خرید vpn

6 روش برای تغییر آی پی

نقایص امنیتی VPN ها

چه زمانی باید از VPN استفاده کنیم

VPN چه چیزهایی را پنهان می کند

سرور VPN چیست

OpenVPN چیست

چگونه رمز عبور های قدرتمند بسازیم

بهترین کاربردهای VPN

تونل VPN چیست

تفاوتهای Proxy و VPN

رفع محدودیت YouTube با استفاده از VPN

دلایل افت سرعت VPN ها و راهکارهای افزایش سرعت

افزایش امنیت آنلاین با استفاده از VPN

رفع محدودیت جغرافیایی با استفاده از VPN

Tor چیست

چگونه وای فای ایمن تری داشته باشیم

خرید vpn برای آیفون

انواع آی پی VPN

SSTP VPN چیست

افزایش امنیت هنگام استفاده از وای فای عمومی

خرید vpn با ip ثابت برای بایننس

خرید vpn با ip ثابت

معایب VPN ارزان قیمت

بهترین VPN برای بایننس

تفاوت Proxy و VPN چیست

خرید vpn با ip ثابت

افزایش امنیت تلفن های هوشمند

تغییر کشور و آی پی با خرید vpn

خرید vpn برای ترید

جلوگیری ار نشت آی پی VPN

خرید vpn با ip ثابت

Profile icon
elmira2
Profile icon
elmira2
Profile icon
alfawritins

aSDFGH

Profile icon
nhvita

Hii,
This is great and awsome post for me. i loved to read your blog. it's really-really amazing. thanks for inspired me by your blog.
https://www.nhvita.com/product/body-massage-essential-oil/

Profile icon
PratikSrivasta3

Hi, nice article. I have been pondering concerning this matter, so thanks for sharing. sbcglobal email help, sbcglobal email support, sbcglobal net email support, sbcglobal email support number, gmail customer service, gmail setup, contact gmail, gmail login help, yahoo email support, yahoo mail customer service, yahoo mail phone number, yahoo mail help, att email support, att email support phone number, att email support number, att email setup, linksys router setup, linksys setup, linksys customer service, linksys support, roadrunner email setup, roadrunner email support, roadrunner phone number, roadrunner email help, amazon kindle support, amazon kindle customer service, kindle support, bellsouth email login, bellsouth email, bellsouth, netgear setup, netgear support number, netgear router setup, netgear phone number, charter email setup, charter email tech support number, charter email help, charter email support number,

This was a great and interesting article to read. I have really enjoyed all of this very cool information chrome download, google chrome down, google chrome download, download chrome for mac, safari not working on iphone, safari not working on mac, safari cannot connect to server, this connection is not private safari, youtube phone number, contact youtube, youtube help, facebook customer service number, facebook number, facebook contact number, opera support, opera support number, opera pms support number, google voice customer service, google voice help, google voice 800 number, onedrive setup, onedrive support, onedrive help, microsoft onedrive support, microsoft customer service, microsoft support number, microsoft support, tumblr support, contact tumblr, tumblr help, tumblr chat, contact instagram, instagram phone number, instagram number, instagram customer service number, hp support number, hp support assistant, hp technical support number, hp customer service number, norton setup, norton support number, norton phone number, norton 360 phone number,

Profile icon
PratikSrivasta3

dell support, dell customer service, dell technical support, dell support number, cisco support, cisco support number, cisco technical support number, cisco tech support, trend micro support, trend micro customer service, trend micro phone number, trend micro contact, verizon email support, verizon email setup, verizon email help, verizon email phone number, charter email setup, charter email support, charter email tech support number, charter email help, roadrunner email setup, roadrunner email support, roadrunner email help, roadrunner email customer service, netflix help, netflix customer service, netflix customer service number, netflix phone number, mac support, mac support number, mac customer service, mac help, arlo support, arlo customer service, arlo setup, arlo support number, lenovo support number, lenovo customer service number, lenovo customer support, norton support, norton setup, norton tech support, sbcglobal email help, sbcglobal email support, sbcglobal net email support, bitdefender support phone number, bitdefender phone number, bitdefender support number, epson printer support, epson printer customer service, epson support, nuance support, nuance technical support, nuance customer service, gmail tech support, gmail help, contact gmail, reset alexa, how to reset alexa, how to reset amazon alexa,

Thanks for publishing these details. I simply wish to let you know that I just look into your site and also, I locate it really fascinating and useful. google chrome setup, google chrome help, chrome setup, hotmail support, hotmail customer service, contact hotmail, linksys router setup, linksys setup, linksys customer service, kodak phone number, kodak customer service phone number, kodak printer customer service, netflix help, netflix customer service, netflix customer service number, amazon kindle support, amazon kindle customer service, kindle support, independent support, Official support, OEM support, pogo support, pogo phone number, pogo customer service phone number, netgear support, netgear setup, netgear tech support, lexmark support, lexmark printer support, lexmark printer support phone number, avg support, avg customer service, avg phone number,

Profile icon
PratikSrivasta3

Great post, just what I was looking for and I am looking forward to reading your other posts soon! health, healthy, natural, nuts and seeds Online, buy nuts, dry fruits online, buy dry fruits, Buy Solely Naturalz Kashmiri Saffron, Solely Naturalz Kashmiri Saffron cost, Solely Naturalz Green Cardamom, Solely Naturalz Green Cardamom cost, Solely Naturalz Indian Round Raisins, Solely Naturalz Indian Round Raisins cost, Solely Naturalz Indian Long Raisins, Solely Naturalz Indian Long Raisins cost, Solely Naturalz W320 Cashew Nuts, Solely Naturalz W320 Cashew Nuts cost, Solely Naturalz W240 Cashew Nuts, Solely Naturalz W240 Cashew Nuts cost, Solely Naturalz California Pistachios, Solely Naturalz California Pistachios cost, Solely Naturalz W180 Cashew Nuts, Solely Naturalz W180 Cashew Nuts cost, Solely Naturalz Jumbo Makhana, Solely Naturalz Jumbo Makhana cost, Solely Naturalz Walnut Halves, Solely Naturalz Walnut Halves cost, Solely Naturalz Jumbo Inshell Walnuts, Solely Naturalz Jumbo Inshell Walnuts cost, Solely Naturalz Munakka Raisins, Solely Naturalz Munakka Raisins cost, Solely Naturalz Afghani Round Raisins, Solely Naturalz Afghani Round Raisins cost, Solely Naturalz Afghani Long Green Raisins, Solely Naturalz Afghani Long Green Raisins cost, Solely Naturalz Gurbandi Almonds, Solely Naturalz Gurbandi Almonds cost, Solely Naturalz Mamra Almonds, Solely Naturalz Mamra Almonds cost, Solely Naturalz California Almonds, Solely Naturalz California Almonds cost, Solely Naturalz Sonora Almonds, Solely Naturalz Sonora Almonds cost,

Profile icon
PratikSrivasta3
Profile icon
familytreemaker

Family Tree maker is not only software; FTM is a treasured platform to store the family ancestry relation history. In a single glance, one can visualize the ancestry relations within the family
Family tree maker 2021 ,Family tree maker 2012 download ,Family tree maker 2014 download,Family tree maker software ,Family tree maker ,ancestry Merge Trees,Ancestry.com sign in,Family tree maker software,Ancestry login,Family tree maker help,Family tree maker,Family tree maker support,,Family tree maker chat,family tree maker not connecting to internet,family tree maker 2017 download,Family tree maker 2019 upgrade,ancestry helper,Ancestry login,how to make a family tree chart,family tree maker 2017 free,ancestry update,Ancestry com login,family tree maker 2019,sign in ancestry,ftm 2017 download,family tree maker download,family tree maker login,support familytreemaker.com,family tree maker 2019 download,family tree maker support phone number,familytreemaker support,family tree maker replacement,support.familytreemaker.com,ftm 2017 upgrade,ftm 2019 upgrade center,can family tree maker be installed on two computers,family tree maker support,ftm support,family tree maker update,ancestry family tree maker 2017,Family tree maker help,Family tree maker chat,Family tree maker support,ancestry helper ,family tree maker not connecting to internet,family tree maker not connecting to internet family tree-maker

how to update maps on 2018 crv,honda navigation update 2019,honda navigation update 2018,honda pilot navigation update download freehonda navigation update 2017,honda navigation update,2016 honda pilot infotainment update ,honda navi,Honda update ,garmin map update ,Nuvigarmin,Garmin map updateGarmin nuvi update,honda gps update,honda map update,garmin honda,Magellan roadmate Updates,magellan roadmate,magellanexplorist,Rand mcnally updates

Profile icon
jitendrasahu
Profile icon
jitendrasahu
Profile icon
erdew

This blog article is fantastic. For all sorts of readers, it is pretty instructive and also rich in excellent informational detail. I am a regular researcher and reader who reads various blog entries on a daily basis for the aim of learning new things. As a member of the reader's society, I wish to contribute to the education of other readers and scholars. You may also read an article I recently wrote on [ Top 5 Best VIRTUAL TRUCK CUSTOMIZATION Apps & Websites] with the same level of information. This will undoubtedly boost the expertise and interest of people that frequent your site on a regular basis.

https://www.infotechbizz.com/top-5-best-virtual-truck-customization-apps-websites/

Profile icon
erdew

This blog article is fantastic. For all sorts of readers, it is pretty instructive and also rich in excellent informational detail. I am a regular researcher and reader who reads various blog entries on a daily basis for the aim of learning new things. As a member of the reader's society, I wish to contribute to the education of other readers and scholars. You may also read an article I recently wrote on [ Top 5 Best VIRTUAL TRUCK CUSTOMIZATION Apps & Websites] with the same level of information. This will undoubtedly boost the expertise and interest of people that frequent your site on a regular basis.

Profile icon
RickiTomphson

Thanks for this!

Profile icon
BobbieRice

If you want increased mileage and a wider scope for your cars guest posts, publishing them on innovatecar.com gives you that opportunity. We have a healthy number of followers who may be interested to read your content. https://newcarbike.com/write-for-us/

Profile icon
BobbieRice

Here at World of Wheels, it is our mission to be the automotive home of drivers in the Des Moines, IA area. We provide a vast selection of new and used vehicles, exceptional car care, and customer service with a smile.
https://allworldwheels.com/

Profile icon
socializeclub

Socialize Club- Buy Facebook live stream views cheap in price but high in quality.We provide you with 100% Real Facebook live stream views delivered at your facebook live video instantly. https://www.socializeclub.com/services/buy-real-facebook-live-stream-views/

Profile icon
ShinChin

@socializeclub
Thank you for sharing your amazing site, here is an other site which also help to get real instagram likes. https://activeig.com/buy-instagram-likes/

Profile icon
DavidPerez56

Home page:https://dotsnel.com/ Here in technology section We will be providing you most updated and latest news on different categories like , Shopping, Business, Browsing, Dating and Travel.

Profile icon
DavidPerez56

Payaler Offers Designer Clothes at Huge Discounts: A blog around Payaler. For more: https://bruitly.com/payaler-reviews/

Profile icon
ClickmoreStuff

How to convert youtube videos to MP3 using FLVto. IMPlogs: a blog about how you can easily convert youtube videos into the format of your choice...https://implogs.com/flvto/

Profile icon
AshutoshRanjan6

Genuine & trusted Delhi escorts provider incall & outcall all vip hotel service. We provide call girls in Delhi on cheap rate. Open 24x7 hours Call me +91-9711857079,
Call girl in Delhi,russian escorts in Delhi,<a href="https://niharikasharma.in/"hotel escorts in Delhi,aerocity escorts,escorts in aerocity,russian escorts in delhi

Profile icon
AshutoshRanjan6

We offer VIP Russian escort in Mumbai at an affordable price. Enjoy the service of Mumbai Russian Escorts. 24/7 Russian Escort Service in Mumbai
Mumbai russian escorts,Russian escorts in Mumbai,Russian escort service in Mumbai,Mumbai russian escorts service,Mumbai russian escorts

Profile icon
AshutoshRanjan6
Profile icon
ClickmoreStuff

Stacy Wilson Bus Crime Scene Photos: A blog about what happened and the photos from the scene.
https://clickmorestuff.com/stacy-wilson-bus-crime-scene-photos/

Profile icon
Johnmash2

@ClickmoreStuff
I hope you are doing well. I'm working on a blog post regarding Edhesive Assignment 5 help. You might be interested in it. Do you mind if I send you it when I will complete it? Please let me know https://dottrusty.com/

Profile icon
FarwaRizvi3

@Johnmash2
I hope you are doing well. i 'm a blogger working on edhesive assigment 5. Mind if i send you when i will complete it? looking forward to your reply.
http://newsdustbin.com/

Profile icon
Johnmash2

Nature has the ability to invigorate and revitalize us all. Whether it is through a walk in the park or a hike up a mountain, we can all benefit from spending time away from the hustle and bustle of life https://plansoutdoor.com/ – it’s science.

Profile icon
Johnmash2

Free software like: adware, security software, free antivirus downloads, download firefox and more https://theslevy.com/

Profile icon
RogerCoombs

The 2022 Lamborghini Aventador LP780-4 Ultimae will make its public debut at this week's Goodwood Festival of Speed. Just 600 examples will be ...https://www.gtopcars.com/makers/lamborghini/2022-lamborghini-aventador/

Profile icon
Johnmash2

Here is some info and advice about choosing the right survival tools https://theoutdoorchamp.com/best-survival-multi-tool-for-backpacking/ to put together a kit for travelling, camping, hiking, or any outdoor adventure. Having a few quality tools can make the difference in helping you survive an emergency situation. Space and weight are always important considerations when it comes to putting together a survival kit.

Profile icon
myclayie

AMR Technosoft Pvt Ltd. is a growing company which provides IT equipment on Rent, Sales, Service and Maintenance. Our services are available at all the locations within the territory of India.
https://www.amrtechnosoft.com/