Code for code coach No numerals not working properly
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String n=sc.nextLine(); if(n.contains("1")){ n=n.replace("1","one"); } else if(n.contains("2")){ n=n.replace("2","two"); } else if(n.contains("3")){ n=n.replace("3","three"); } else if(n.contains("4")){ n=n.replace("4","four"); } else if(n.contains("5")){ n=n.replace("5","five"); } else if(n.contains("6")){ n=n.replace("6","six"); } else if(n.contains("7")){ n=n.replace("7","seven"); } else if(n.contains("8")){ n=n.replace("8","eight"); } else if(n.contains("9")){ n=n.replace("9","nine"); } else{ n=n.replace("10","ten"); } System.out.print(n); } }