Skip to content

miladmofidi/NumberToString-Converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Number To String Converter

This is a project for converting numbers to constant/dynamic words and finding their repetition frequency without using the If-Else or Switch-Case statements, just using Java 8 features.

Demo

For example:
if inputted numbers i has specific conditions then convert that number to specific strings, for example: if i % 3 == 0 then replace that number with a specific string e.g."CMAS", or if i % 5 == 0 then replace that number with a specific string e.g."systems" and return the newly generated string with a count of each string repetition:

INPUT:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20    

OUTPUT:

1 2 good 4 systems CMAS 7 8 CMAS systems 11 CMAS good 14 CMASsystems 16 17 CMAS 19 systems.  
CMAS: 4    
systems: 3    
CMASsystems: 1    
good: 2     
integer: 10

Authors

Releases

No releases published

Packages

No packages published

Languages