How do i write for(i=0,i<num,i++) in the following case?



I am in the situation where i need to get the value from the user with the help of INPUTdialog

and run the for loop in order to do the certain task.

Please give me some idea . check these directives to understand my problem:-

-open browser
-go to certain site.
-ask user to enter certain amount
-use that amount to run a for loop, such that certain button is clicked that many times

NOte:- i HAVE made use of flowchart and i am not about to drag any "for each loop"
Also i am only allowed to run the for each row loop, where there is no row in my situation… Please help me.


try if condition inside a for each loop and break the loop if condition fails


i mean to say that
when i try to use “for each loop”, there are two boxes, “for each -------- in ----------------”

how do i give following stuff in that???
my project is like this:-

(enter the number of records: for example 3)
so 3 gets stored in int variable ‘number’

then certain loop will run 3 times

so basically what will come in the for each ------------ in -------------------- place???
also what will come in the if condition???


“ignore my previous post”

why don’t you use while loop as you want to click on button. are you not allowed to use while loop?

I have used for each till now to get files from a folder, i have used for ienumerable variables. happy to hear different question from you.


ForEach number in Enumerable.Range(0, inputnumber)

Should work.
Inputnumber and foreach type should be Int32 type.


use the for loop and inside that use if condition