Skip to content

Java program to convert input alpha string to integer values.

Notifications You must be signed in to change notification settings

BigDaddyKahuna/CodeTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Java program to convert input alpha string to integer values.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages