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

 

orion.a.smith@gmail.com apcsa-encryption > apcsaEncryptIntToChar
prev  |  next  |  chance

Given an input of a single int, return the char value that the int becomes using ASCII encryption. Precondition: all inputs will represent visible ASCII values in the range 33-127.


HINT: use the char data type, which (with typecasting) can be directly converted from int.  That's because char is stored as a 16-bit number, and int is stored as a 32-bit number.

apcsaEncryptIntToChar(65) → "A"
apcsaEncryptIntToChar(66) → "B"
apcsaEncryptIntToChar(97) → "a"

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

public char apcsaEncryptIntToChar(int code) { }

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: 210

Copyright Nick Parlante 2017 - privacy