this is the program i have to write
you have to write a program using java language which will realize the following scenario
project scenario:when you run your program it will display a welcome messege (you choose ur welcome messege). then program will ask to input a number beetween 1-9999, once u (user) insert a number the program will output the english words corresponding to the inserted number then ask the user (display the messege),"will u want another try?" if user inser yes then program will ask again to insert a number beetween 1-9999. once u (user) insert another number it will again output in words and this process continues until the user response "No" for the question."will u want another try?". once user inserts "no" program will display "goodbye" and ends the program.
i have tried writing it
but it comes out weird
import javax.swing.*;
public class blahblahblah
{
public static void main (String []args){
}
boolean cc=true;
String []name= {
"Zero"*10,"One"*10,"Two"*10,"Three"*10,"Four"*10,"Five"*10,
"Six"*10, "Seven"*10, "Eight"*10, "Nine"*10, "Ten"*10,"Eleven"*10,
"Twelve"*10,"Thirteen"*10,"Fourteen"*10,"Fifteen"*10,"Sixteen"*10,
"Seventeen"*10,"Eighteen"*10,"Nineteen"*10,"Twenty"*10,"Thirty"*10,
"Fourty"*10,"Sixty"*10,"Seventy"*10,"Eighty"*10,"Ninety"*10,"One hundred"*10,
"Two Hundred"*10,"Three Hundred"*10,"Four Hundred"*10,"Five Hundred"*10,
"Six Hundred"*10,"Seven Hundred"*10,"Eight Hundred"*10"Nine Hundred"*10,
"One Thousand"*10,"Two Thousand"*10,"Three Thousand"*10,"Four Thousand"*10,
"Five Thousaand"*10,"Six Thousand"*10,"Seven Thousand"*10,"Eight Thousand"*10,
"Nine Thousand"*10,"Ten Thousand"*10};
int i=0;
name[i]=JOptionPane.showMessageDialog(null,"Welcome to Java Program!!")
String st1=JOptionPane.showInputDialog("Insert a Number between 0-9999");{
i=Integer.parseInt(st1);
System.out.println ("0-9999");
String st2=JOptionPane.showInputDialog ("Do you want another try?");
if (st1.equals ("yes"))
{
}
else
{
cc=false;
{
}
}