Alpha Geek

(8)

$10/per page/Negotiable

About Alpha Geek

Levels Tought:
University

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Environmental science,Essay writing,Programming,Social Science,Statistics Hide all
Teaching Since: Apr 2017
Last Sign in: 345 Weeks Ago, 3 Days Ago
Questions Answered: 9562
Tutorials Posted: 9559

Education

  • bachelor in business administration
    Polytechnic State University Sanluis
    Jan-2006 - Nov-2010

  • CPA
    Polytechnic State University
    Jan-2012 - Nov-2016

Experience

  • Professor
    Harvard Square Academy (HS2)
    Mar-2012 - Present

Category > Computer Science Posted 23 Apr 2017 My Price 5.00

Write a recursive method called evenDigits

Write a recursive method called evenDigits that accepts an integer parameter and that returns the integer formed by removing the odd digits from it.

For example, evenDigits(8342116) returns 8426 and evenDigits (-34512) returns -42.

If the number is 0 or has no even digits, such as 35159 or 7, return 0.

Leading zeros in the result should be ignored.

 

Answers

(8)
Status NEW Posted 23 Apr 2017 11:04 AM My Price 5.00

-----------

Attachments

file 1492948452-Answer.docx preview (266 words )
W-----------rit-----------e a----------- re-----------cur-----------siv-----------e m-----------eth-----------od -----------cal-----------led----------- ev-----------enD-----------igi-----------ts -----------tha-----------t a-----------cce-----------pts----------- an----------- in-----------teg-----------er -----------par-----------ame-----------ter----------- an-----------d t-----------hat----------- re-----------tur-----------ns -----------the----------- in-----------teg-----------er -----------for-----------med----------- by----------- re-----------mov-----------ing----------- th-----------e o-----------dd -----------dig-----------its----------- fr-----------om -----------it.----------- F-----------or -----------exa-----------mpl-----------e, -----------eve-----------nDi-----------git-----------s(8-----------342-----------116-----------) r-----------etu-----------rns----------- 84-----------26 -----------and----------- ev-----------enD-----------igi-----------ts -----------(-3-----------451-----------2) -----------ret-----------urn-----------s ------------42.----------- I-----------f t-----------he -----------num-----------ber----------- is----------- 0 -----------or -----------has----------- no----------- ev-----------en -----------dig-----------its-----------, s-----------uch----------- as----------- 35-----------159----------- or----------- 7,----------- re-----------tur-----------n 0-----------. -----------Lea-----------din-----------g z-----------ero-----------s i-----------n t-----------he -----------res-----------ult----------- sh-----------oul-----------d b-----------e i-----------gno-----------red-----------. -----------  ----------- So-----------lut-----------ion-----------: -----------Ple-----------ase----------- fi-----------nd -----------the----------- co-----------de -----------bel-----------ow.----------- -----------Exp-----------lan-----------ati-----------on:----------- -----------The----------- pr-----------ogr-----------am -----------con-----------tai-----------ns
Not Rated(0)