Well explaine, but I am not clear of executive in situations where its true or false. Can you try to use the same Do expression in both. to see where the execution will end. E.g X
@ajaykushwaha4233 Жыл бұрын
Sir I need help, situation is : suppose there is dataset with 2 row, if we write output it make 4 rows. If we write 2 time output it will create 6 rows. Is there a way to write code in which user pass value and that many time output must execute. I tried with so loop but it did not work.
@learnerea Жыл бұрын
did you try using loop in that case..?
@monikapatil55372 жыл бұрын
Hello sir, i use do until and do while in result using until condition year=19 and in while year=20????? Please can you run below code data one; income=100; total_cost=12; do year=1 to 30 until(total_cost>=income); total_cost+total_cost*0.12; end; keep income total_cost year; run; proc print data=one; run; data two; income=100; total_cost=12; do year=1 to 30 while(total_cost
@bawgiapoorva491210 ай бұрын
Hey so i tried your codes and the reason the do until stops at 19 years is at the 19th iteration, the total_cost is calculated as 92.2796. In the next iteration, the total_cost would be updated to 92.2796 + (92.2796 * 0.12) = 103.3532, which is greater than or equal to the income of 100.Therefore, the loop terminates because the condition until(total_cost >= income) is satisfied, and no further iterations are performed.
@bawgiapoorva491210 ай бұрын
also you have to mention output; because you want the iteration in the output.
@sabestek88964 жыл бұрын
weak ... the absolute only thing to keep in mind is: while "" . while( $i < 10) && until($i > 10) I just sparred you the 6 minutes from watching this. lol
@yessir-qj6hu2 жыл бұрын
So whats the do until and do while answer bro can you help?