# Search:

Type: Posts; User: Delstateprogramer

1. ## Thread: Trouble with law of Cosine program

by Delstateprogramer
Replies
3
Views
3,115

### Re: Trouble with law of Cosine program

thanks and how would I be sure that its returning degrees(I dont want Radians)?and what of the regular cos(double x) that one is giving me an error too?
2. ## Thread: Trouble with law of Cosine program

by Delstateprogramer
Replies
3
Views
3,115

### Trouble with law of Cosine program

Hello all you Java programmers out there. I have a tiny problem. The code is not allowing me to use the cos(double x) and acos(double x) methods even though I imported the math class. So....Whats...

by Delstateprogramer
Replies
11
Views
1,851

it worked thx alot man

by Delstateprogramer
Replies
11
Views
1,851

ok thx ill try that

by Delstateprogramer
Replies
11
Views
1,851

hey i tried it.. maybe i invoked the method at the wrong point. there is an infinite recursion some where. Heres the code

public static void main(String[] args) {
...

by Delstateprogramer
Replies
11
Views
1,851

Alright guys and girls got a new one I need a lil help with. Im currently writing a program that is supposed to add the elements in a array and return the sum. Its supposed to be a recursive method...
7. ## Thread: New Recursion problem need lil help

by Delstateprogramer
Replies
21
Views
1,958

### Re: New Recursion problem need lil help

lol the code works and that all that matters
8. ## Thread: New Recursion problem need lil help

by Delstateprogramer
Replies
21
Views
1,958

### Re: New Recursion problem need lil help

Thank you for your help everyone i figured the problem out heres the code i used

{
if(number<10)
{
sum=number+sum;
}
else
9. ## Thread: New Recursion problem need lil help

by Delstateprogramer
Replies
21
Views
1,958

### Re: New Recursion problem need lil help

Tried this code and it didnt work

if(number<10)
{
return number;
}
else
{
10. ## Thread: New Recursion problem need lil help

by Delstateprogramer
Replies
21
Views
1,958

### Re: New Recursion problem need lil help

Ok thx ill try that out
11. ## Thread: New Recursion problem need lil help

by Delstateprogramer
Replies
21
Views
1,958

### Re: New Recursion problem need lil help

how do i save the prior digits to add them up at the end becuz here they keep changing and are not saved so they cant be added at the end
12. ## Thread: New Recursion problem need lil help

by Delstateprogramer
Replies
21
Views
1,958

### Re: New Recursion problem need lil help

The user should be able to enter any integer and the program should output the sum of the digits in the integer.
13. ## Thread: New Recursion problem need lil help

by Delstateprogramer
Replies
21
Views
1,958

### Re: New Recursion problem need lil help

I didnt intend for it to be a number 1 through 99. It would not matter what the user put in. and yes it would add the digits in an integer. Heres an example.

If the user entered the integer 223...
14. ## Thread: New Recursion problem need lil help

by Delstateprogramer
Replies
21
Views
1,958

### Re: New Recursion problem need lil help

thats the new code but yea its a logical error in there somewhere
15. ## Thread: New Recursion problem need lil help

by Delstateprogramer
Replies
21
Views
1,958

### Re: New Recursion problem need lil help

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
System.out.println("Enter an integer:");
...
16. ## Thread: New Recursion problem need lil help

by Delstateprogramer
Replies
21
Views
1,958

### Re: New Recursion problem need lil help

yes thats exactly it and I fear i thought i got it but i didnt still need some help lol
17. ## Thread: New Recursion problem need lil help

by Delstateprogramer
Replies
21
Views
1,958

### Re: New Recursion problem need lil help

Nvm all i got it
18. ## Thread: New Recursion problem need lil help

by Delstateprogramer
Replies
21
Views
1,958

### Re: New Recursion problem need lil help

Changed my mind not gonna use an array, ive decided to do something like this but its not really working and i kno why but i dnt know how to change itm

while(number>10)
{
digit=number%10;
sum...
19. ## Thread: New Recursion problem need lil help

by Delstateprogramer
Replies
21
Views
1,958

### New Recursion problem need lil help

this program is supposed to add up the integers in a number entered by a user and print out the sum. i got the easy part down.

if(number<10)
{
sum=number;
}

for the next part i was...
20. ## Thread: Recursion Problem Need Help ASAP

by Delstateprogramer
Replies
6
Views
2,234

### Re: Recursion Problem Need Help ASAP

...I just knew it was something simple like that....I feel dumb lol, But thanks man preciate it.
21. ## Thread: Recursion Problem Need Help ASAP

by Delstateprogramer
Replies
6
Views
2,234

### Re: Recursion Problem Need Help ASAP

Heres the modified code

System.out.println("Enter an integer:");
Scanner input=new Scanner(System.in);
int number= input.nextInt();
...
22. ## Thread: Recursion Problem Need Help ASAP

by Delstateprogramer
Replies
6
Views
2,234

### Re: Recursion Problem Need Help ASAP

Hey thx.. I changed the code a bit since this post... I have decided to use the modulus operator and I still need a bit of help. And yes this problem does require recursion. Heres the problem from...
23. ## Thread: Recursion Problem Need Help ASAP

by Delstateprogramer
Replies
6
Views
2,234

### Recursion Problem Need Help ASAP

I need help making a recursive program that computes the number of odd digits in a number. This is as far as I have gotten.

public class ComputeOddNumbers {

/**
* @param args the...