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

 

dogrady-cunniff@ccboe.com stringreview > howFarChar
prev  |  next  |  chance

How far away is a character from the letter 'a'? Return how many spaces away from 'a' the given letter is.


howFarChar("a") → 0
howFarChar("b") → 1
howFarChar("1") → 48

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

public int howFarChar(char c){ }

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: 110 Post-solution available

Copyright Nick Parlante 2017 - privacy