Click here to Skip to main content
16,010,427 members

Comments by Member 13188016 (Top 14 by date)

Member 13188016 16-May-17 3:52am View    
no:/
https://ibb.co/gw1tAk
tis is the output of the problem that i want to write
since im beginner so maybe approach this problem in beginner way too :/
Member 13188016 16-May-17 3:50am View    
thanks for the answer
https://ibb.co/gw1tAk please refer this link for the output.
to produce this output, is it better use for loop or array(?)
and please explain the way too!!
Member 13188016 14-May-17 8:46am View    
thankyou so much!!!!!!!!!!!!!!!!!!!!!!!!! for the detailed explanation!!!!!!!!!!!!!! hope to find someone like you again everytime im confuse!!!lol ><
Member 13188016 14-May-17 8:33am View    
ah got it!!!!
it means i=2 because the initialization
and j =2
because the condition is true 4<10000 it will execute the execution statement
then j will be incremented to 3
so i*j<10000 -> 6 <10000 that is why all the value of even number in array become 0
then for i=j=3 it will make the value of multiple 3 become 0 in array
and so on?
Member 13188016 14-May-17 8:14am View    
Still dont understand the inner loop part
For (j=i;i*j<10000;j++) {prime(i*j)=0}
Means i=j=2
2^2=<10000(means if the condition true will process the latter or will increment j++ until it reach 10000?);j++
And if j is incremented by 1 it should be 3*3=9 so why the even number all was eliminated? Is the elimination occur in the first iteration?