# Search:

Type: Posts; User: geezlouise

1. ## Thread: Need help with my code (physics pendulum)

by geezlouise
Replies
11
Views
546

### Re: Need help with my code (physics pendulum)

Well the variable that controls the while loop are anlgeIsZero and angleIsZeroNext.As long as they are equal to zero then the loop would continue...angleIsZero and angleIsZeroNext are basically...
2. ## Thread: Need help with my code (physics pendulum)

by geezlouise
Replies
11
Views
546

### Re: Need help with my code (physics pendulum)

int j = 0; // Index looping over time
double angleIsZero = 0; // Storing the time when angle is zero

while(angleIsZero == 0)
{
// If the angle switch sign...
3. ## Thread: Need help with my code (physics pendulum)

by geezlouise
Replies
11
Views
546

### Re: Need help with my code (physics pendulum)

I think I'm stuck in an infinite loop...this is what is written on line 169:

if(angle[j]*angle[j+1]<0){
// Choose the angle with the smallest magnitude
angleIsZeroNext =...
4. ## Thread: Need help with my code (physics pendulum)

by geezlouise
Replies
11
Views
546

### Re: Need help with my code (physics pendulum)

Yeah..I don't understand what makes that happen though.And its out of bounds in what array?Is there a way to find out?
5. ## Thread: Need help with my code (physics pendulum)

by geezlouise
Replies
11
Views
546

### Re: Need help with my code (physics pendulum)

Hey thanks for your reply,Norm.So its kind of odd but I only get an out of bounds error when I change the drivingForce to anything but zero,my code works when its zero but i get an error whenever i...
6. ## Thread: Need help with my code (physics pendulum)

by geezlouise
Replies
11
Views
546

### Need help with my code (physics pendulum)

import java.io.*;

public class omg
{
// Declare constants

public static final double DT = 1e-2; // time interval in seconds
public static final double Tmax = 1000.; //...
7. ## Thread: Quick little question

by geezlouise
Replies
3
Views
260

### [SOLVED] Re: Quick little question

Yes on the command line, and as a superscript.
8. ## Thread: Quick little question

by geezlouise
Replies
3
Views
260

### [SOLVED] Quick little question

Hey guys,just wanted to know if there is a way to make java display an exponent?I need to display a polynomial x^3-x-1.For now i just wrote it as xE3-x-1 but i wanted to know if there is a way to...
9. ## Thread: Beginner,first java program assignment

by geezlouise
Replies
7
Views
567

### Re: Beginner,first java program assignment

Thanks for your help Norm,you solved the error that I was having,now I will try to finish writing the program.I will post anything if something happens.
10. ## Thread: Beginner,first java program assignment

by geezlouise
Replies
7
Views
567

### Re: Beginner,first java program assignment

//Source listing for Assignment 1.

import javax.swing.JOptionPane;

public class Assignment1

{
public static void main(String[] args)
{
11. ## Thread: Beginner,first java program assignment

by geezlouise
Replies
7
Views
567

### Re: Beginner,first java program assignment

Oh sorry I did not know about that.I will use that for future posts.Also,thanks for your input Starstreak, I think I know what you are trying to tell me...but its still not quite clear.I'm gonna try...
12. ## Thread: Beginner,first java program assignment

by geezlouise
Replies
7
Views
567

### Beginner,first java program assignment

Hey guys,I'm new to java programming and I am taking an introductory class to computer programming; and I am having trouble with our first assignment. Basically all I want my program to do is gather...
Results 1 to 12 of 12