id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > quiz2024_10_03_APP1SLHL_strangeNum
prev  |  next  |  chance

Write a method that returns 'num1' but with the one's place from 'num1' replaced by the one's place from 'num2'. For example, if 'num1' is 128 and 'num2' is 17, you would return 127. As preconditions, you may assume that both 'num1' and 'num2' are positive. Look at the test data for more examples.


quiz2024_10_03_APP1SLHL_strangeNum(1248, 353) → 1243
quiz2024_10_03_APP1SLHL_strangeNum(325897, 923) → 325893
quiz2024_10_03_APP1SLHL_strangeNum(912, 8000) → 910

...Save, Compile, Run (ctrl-enter)

public int quiz2024_10_03_APP1SLHL_strangeNum(int num1, int num2) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 220

Copyright Nick Parlante 2017 - privacy