For eg.
if I want to write number from 1 to 100 skipping every multiple of 3. How can we write it ?
I tried $fl(1, 100, "i + 1", if(i % 3 = 0, "", i), " ")$
But it didn't worked. It gave output from 1 to 100 without skipping any number.
For eg.
if I want to write number from 1 to 100 skipping every multiple of 3. How can we write it ?
I tried $fl(1, 100, "i + 1", if(i % 3 = 0, "", i), " ")$
But it didn't worked. It gave output from 1 to 100 without skipping any number.
I know this is a long time ago, but I found a solution to your question. Your question helped me solve my problem too!!! thank you!
$fl(1, 100, "i+1", "if(i%3>0, i)", " ")$
Some of my testing.
MY PROBLEM:
I want to do something when a certain app has a notification. So I must loop through the notifications, and if one of them is the app I am looking for I can then respond... Here is what I came up with:
$if(
fl(0, ni(count)-1, "i+1",
"if(ni(i, app)=BlackPlayer EX, true)",
"")
=true, ALWAYS, NEVER)$
Hopefully my formatting makes it easier to read. If the for loop produces the string "true" we can act on it. In this case I want to make something visible or not.
Hi everyone :-) I have another question to this topic:
Is it possible to apply the same if-condition to the separator of the for-loop?
$fl(1,20,"i+1","if(i%3!=0,i)","if(i%3!=0,x)")$
I hope anyone can help me.