Shae Weathers

Greenhorn
+ Follow
since Jun 26, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Shae Weathers

I totally had a memory lapse..I was working on an applet and was trying to run it in the command prompt. I finally realized what I was doing wrong.
13 years ago
Whenever I try to run my program, I keep getting the same message : Exception in thread "main" java.lang.NoSuchMethodError: main
What does this mean or what am I doing wrong?
13 years ago
I have edited the original post to make it easier to read, thanks for the suggestion.
13 years ago
I hope someone can lead me in the right direction. I am trying to format my currency to two decimal places, for instance, whenever I enter an amount like 75.50 is shows up as 75.5. Also whenever the program computes the change is comes out as 3.0900000034. Here is an example of the output I get

Enter amount of purchase:
98.00
Enter amount tendered:
101.09
You owe $98.0 and you gave me $101.09 your change amount is $3.0900000000000034.
Your change is:
3 dollars
0 quarters
0 dimes
1 nickels
4 pennies
13 years ago
Thank you so much! I eventually came up with the solution shortly after posting the question
13 years ago
I recently wrote a program will print out the spelling of numbers between 0-25 when inputted, now I need to figure out how to get the program to print out the statement "out of range" when a number is entered outside of that range. I tried using the if else statement, but I kept getting an error message. This is what I have so far:

public class Say
{

static String number[];

public static void main( String[] args )
{
number = new String[26];
number[0] = "zero";
number[1] = "one";
number[2] = "two";
number[3] = "three";
number[4] = "four";
number[5] = "five";
number[6] = "six";
number[7] = "seven";
number[8] = "eight";
number[9] = "nine";
number[10] = "ten";
number[11] = "eleven";
number[12] = "twelve";
number[13] = "thirteen" ;
number[14] = "fourteen";
number[15] = "fifteen";
number[16] = "sixteen";
number[17] = "seventeen";
number[18] = "eighteen";
number[19] = "nineteen";
number[20] = "twenty";
number[21] = "twenty-one";
number[22] = "twenty-two";
number[23] = "twenty-three";
number[24] = "twenty-four";
number[25] = "twenty-five";



int n = Integer.parseInt( args[0] );
System.out.println( number[ n ] );
}

}
13 years ago
Thanks for the replies, shortly after I posted the question I realized it was a matter of removing "ln" from the system.out.print statement.
13 years ago
I need help formatting an assignment. The instructions were to create a program that would write a name 100 times. The program outputs the information vertically, but I need it to output it horizontally. Can anyone help me with this matter?
13 years ago