Skip to content

Latest commit

 

History

History
32 lines (18 loc) · 803 Bytes

README.md

File metadata and controls

32 lines (18 loc) · 803 Bytes

CodeTest

This is a Java program to sum up input alpha characters to integer values. I wrote this for a code test I did in the fall of 2022.

Requirement:

Write a program to sum up the characters in a username. Each letter in the alphabet is assigned a value, A=1, B=2, C=3 and so on.

Non alphabet characters are not used in the final sum.

Functionality:

  • Prompt user for username
  • For each character in the username sum up the correlated integer value.
  • Display the username and the sum.

Sample output:

C:\dev\code\prototypes\java\CodeTest\out\production\CodeTest>java CodeTest

Enter username

Jack Rief

Username value: Jack Rief = 63

C:\dev\code\prototypes\java\CodeTest\out\production\CodeTest>java CodeTest

Enter username

Jack Rief *()_&&%

Username value: Jack Rief *()_&&% = 63