User Profile

Collapse

Profile Sidebar

Collapse
jaydel bujawe
jaydel bujawe
Last Activity: Jun 13 '12, 06:16 AM
Joined: Mar 19 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jaydel bujawe
    replied to JavaScript modulo condition
    please help me. I don't know what to do anymore. thanks!...
    See more | Go to post

    Leave a comment:


  • jaydel bujawe
    replied to JavaScript modulo condition
    java script



    Code:
    begin
    		input N
    		set F to 2
    		while N > 1
    			if N divides F without a remainder then
    				output F
    				set N to N / F
    			else
    				add 1 to F
    			end if
    		end while
    end
    this is how it looks like in pseudocode. i can't convert it to java script starting from the while loop. this is how my code looks like..

    Code:
    <script>
    ...
    See more | Go to post
    Last edited by Dormilich; Mar 19 '12, 11:35 AM. Reason: Please use [CODE] [/CODE] tags when posting code.

    Leave a comment:


  • jaydel bujawe
    replied to JavaScript modulo condition
    java script

    What code is needed if i make a "while" loop in java script and inside it there's an "if" which makes decision. And the condition is i have to divide two variables. the one variable is asked from the user and the other variable is set to 2.So, the condition to continue the if is if the two variables is divided without remainders and the else portion is to add 1 to the variable that we set to 2.how can...
    See more | Go to post

    Leave a comment:


  • jaydel bujawe
    started a topic JavaScript modulo condition

    JavaScript modulo condition

    how can you say it in a decision using if in java script that you only do the condition if two variables can be divided but should be without remainders?
    See more | Go to post
No activity results to display
Show More
Working...