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...
Type: Posts; User: geezlouise
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...
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...
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 =...
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?
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...
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.; //...
Yes on the command line, and as a superscript.
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...
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.
//Source listing for Assignment 1.
import javax.swing.JOptionPane;
public class Assignment1
{
public static void main(String[] args)
{
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...
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...