I just started using Java and am learning Do/While loops and Booleans; However, an error keeps popping up with the nexInt. I have no idea what I am doing :).
Here is the assignment this program is supposed to complete:
"Set up a password variable…
I am using a script like this to loop through some data in a text file:
Do Until objFile.AtEndOfStream
'Check if it is not a blank line; otherwise skip it
If Len(Trim(objFile.ReadLine)) > 0 Then
'Some code
end if
Loop
I print…
I am trying to write a for loop in the second version which produce the same result in the original code but i am not sure how to get -400,-200,-400 in sequential order.
original code:
p->m_p[0] = randFloat(-400.0f, 400.0);
p->m_p[1] =…
I'm creating a class that keeps the scores of quizzes taken by students. Here's the specs:
The constructor is to
a. Create an instance of an int-type array with the length of input parameter. Each
element in the array is initialized as -1.
b. The…
So yesterday I asked a question about some GUI-ing. I completly threw that over, since I found it a little to complicated for me to actually deal with it.
Now I am reworking the thing in the console.
And I got myself stuck again. My problem this…
I have the following code :
data DEFBIS.Taux_fec_2006_2010;
set DEFBIS.Taux_fec_2006_2010;
Taux_15 = 1000 * N_15 / (5 * P_15);
Taux_16 = 1000 * N_16 / (5 * P_16);
...
Taux_49 = 1000 * N_49 / (5 * P_49);
run;
How can I condense this code…
Im using the following loop to generate the sums of some columns using a class statement:
%macro do_mean;
%do i = 50 %to 100;
%let string1 = %eval(100-&i);
**%if string1 = 5 %then %let string1 = "05";**
%if &i = 95 or &i = 90 or &i = 80 or &i =…
I want to replace values of some variables and rename them. Basically, I have many variables called f2 f3 f4 and so on up to f1065. The logic is as folllows: I need to replace values of variables f14 f18 and so on by 4 up to f54 by values of…
I would like to split my observations in a "parent" dataset into their own unique "child" datasets. I need to do this for several parent datasets, so I am trying to create a macro with a do loop inside to generate these datasets. But my code is…
I have a job that has an input and I want to loop over a list of parameters while submitting the job. Here is the part of my script:
#!/bin/bash
errors=$HOME/ERRORS/convergence/GvsE/B_2/error.log
count=`qstat | wc -l`
gi=( "0" "0.25" "0.5" "1" "2"…
So my program is designed to great the user and ask for a password. once the user enters a password it is compared to my precoded password "ans[]" and if the password matches what the user enters then it prints a welcome greeting.
#include…
I am creating a Rock-Paper-Scissors game. I need the code to loop until the player chooses to quit. How can I accomplish this.
Imports System.Random
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As…
I have 51 files (I pulled unemployment rates for all 50 states plus DC from the BLS), and I need to stack them on top of each other. I am working on a macro that will import the files and then stack them, but I am stuck on how I can write a loop to…
i would like to get result of brand_channel macro.
macro is not working on i=2,3,4 in %do-loop statement.
How can I execute doing_scoring macro iteratively?
thanks!
%doing_scoring;
...
...
...
%mend doing_scoring;
%macro brand_channel;
proc sql…
So there is some problem in this code, its probably just some punctuation error that I haven't noticed yet but for some reason I cant find it.
I read that this is how to do a loop with Do then the number of times, in this case '%dmg%', tell me if…