Algorithm practice

https://codepen.io/ldfowler/pen/qBjOOvV

// // 1.) Write a function that returns an array with all the numbers from 1 to 255.
// function ReturnArrayFromOneTo255()
12:07
//2.) Write a function that would get the sum of all the even numbers from 1 to 10…


This content originally appeared on DEV Community and was authored by LATOYA FOWLER

https://codepen.io/ldfowler/pen/qBjOOvV

// // 1.) Write a function that returns an array with all the numbers from 1 to 255.
// function ReturnArrayFromOneTo255()
12:07
//2.) Write a function that would get the sum of all the even numbers from 1 to 1000.
//3.) Write a function that returns the sum of all the odd numbers from 1 to 5000.
// 4.) Write a function that returns the sum of all the values within an array.
// (e.g. [1,2,5] returns 8, [-5,2,5,12] returns 14).
// 5.) Given an array with multiple values,
// write a function that returns the maximum number in the array.
// 6.) Given an array with multiple values,
// write a function that returns the average of the values in the array.
// [1,3,5,7,20] average is 7.2
// 7.) Write a function that would return an array of all the odd numbers between 1 to 50.


This content originally appeared on DEV Community and was authored by LATOYA FOWLER


Print Share Comment Cite Upload Translate Updates
APA

LATOYA FOWLER | Sciencx (2021-08-29T01:21:30+00:00) Algorithm practice. Retrieved from https://www.scien.cx/2021/08/29/algorithm-practice/

MLA
" » Algorithm practice." LATOYA FOWLER | Sciencx - Sunday August 29, 2021, https://www.scien.cx/2021/08/29/algorithm-practice/
HARVARD
LATOYA FOWLER | Sciencx Sunday August 29, 2021 » Algorithm practice., viewed ,<https://www.scien.cx/2021/08/29/algorithm-practice/>
VANCOUVER
LATOYA FOWLER | Sciencx - » Algorithm practice. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/29/algorithm-practice/
CHICAGO
" » Algorithm practice." LATOYA FOWLER | Sciencx - Accessed . https://www.scien.cx/2021/08/29/algorithm-practice/
IEEE
" » Algorithm practice." LATOYA FOWLER | Sciencx [Online]. Available: https://www.scien.cx/2021/08/29/algorithm-practice/. [Accessed: ]
rf:citation
» Algorithm practice | LATOYA FOWLER | Sciencx | https://www.scien.cx/2021/08/29/algorithm-practice/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.