Recent content by d-star
-
D
Fortran Creating a Loop for Sum of Digit Squares to Equal 1
alright, thanks! it actually had a suspicion that that was the case. Although I have another question as well. I also need to integrate a way that basically identifies if each value from 1 to x satisfies the condition that its sequence eventually reaches 1, and I also need to make my program...- d-star
- Post #4
- Forum: Programming and Computer Science
-
D
Fortran Creating a Loop for Sum of Digit Squares to Equal 1
Hi, I'm writing a program in fortran that basically creates a loop from 1 until a certain number x (input by the user), and goes through each value between 1 and the certain number x in order to determine if each value meets certain criteria. The criteria is that the sum of the square of the...- d-star
- Thread
- Loop Squares Sum
- Replies: 3
- Forum: Programming and Computer Science
-
D
Fortran Fortran: Creating a sequence with constraints
Sorry! I have one more quick question! I would like to configure my program so that if the length of the sequence (number of terms) exceeds a certain number, the sequence terminates. I know that I must use an EXIT statement, as well as defining the number of terms under a certain variable...- d-star
- Post #9
- Forum: Programming and Computer Science
-
D
Fortran Fortran: Creating a sequence with constraints
got it! thanks so much!- d-star
- Post #8
- Forum: Programming and Computer Science
-
D
Fortran Fortran: Creating a sequence with constraints
Okay, so I managed to whip up a new code that seems to be working better than the previous one. The problem is, when I run the program, the sequence only follows one of the constraints, and keeps repeating from the first number that I input. This may sound confusing, but for example, if I...- d-star
- Post #6
- Forum: Programming and Computer Science
-
D
Fortran Fortran: Creating a sequence with constraints
In this case, would I have to declare a logical statement?- d-star
- Post #5
- Forum: Programming and Computer Science
-
D
Fortran Fortran: Creating a sequence with constraints
So I managed to construct something. Obviously, it isn't correct, but I think I might be on the right track. Before I write the code I'll do as you said, explain what I want to do in simple english: "Read the value that I input, and start the sequence with that value" "Starting from the value...- d-star
- Post #3
- Forum: Programming and Computer Science
-
D
Fortran Fortran: Creating a sequence with constraints
I'm trying to write a program in fortran that will create a sequence of numbers (starting with a number that I input) that follow the following constraints: If the number (n) in the sequence is even, then the next number in the sequence will be n/2. If the number (n) in the sequence is odd, then...- d-star
- Thread
- Constraints Fortran Sequence
- Replies: 9
- Forum: Programming and Computer Science