You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							31 lines
						
					
					
						
							956 B
						
					
					
				
			
		
		
	
	
							31 lines
						
					
					
						
							956 B
						
					
					
				<html><body><pre><script>
 | 
						|
    document.write("\ndiviser (avec reste) 31 par 5 par soustraction en récusrif \n");
 | 
						|
    /* Pseuso code :
 | 
						|
        fonction div_avec_reste(opg, opd)
 | 
						|
            var resutlat tableau;
 | 
						|
            resultat = [0,0];
 | 
						|
            si opg < opd
 | 
						|
                retourner [0,opg];
 | 
						|
            sinon
 | 
						|
                resultat = div_avec_reste(opg - opd, opd)
 | 
						|
                retourner [resultat[0]+1, resultat[1]]
 | 
						|
            fin si
 | 
						|
        fin fonction
 | 
						|
    */
 | 
						|
    function div_avec_reste(opg,opd) {
 | 
						|
        console.log("div_avec_reste("+opg+","+opd+")");
 | 
						|
        let resultat = [0,0];
 | 
						|
        if(opg < opd) {
 | 
						|
            resultat = [0,opg];
 | 
						|
            return resultat;
 | 
						|
        }
 | 
						|
        else {
 | 
						|
            resultat = div_avec_reste((opg - opd),opd);
 | 
						|
            return [resultat[0]+1, resultat[1]];
 | 
						|
        }
 | 
						|
    }
 | 
						|
    var res= div_avec_reste(31,5);
 | 
						|
    document.write(res[0] + " reste " + res[1]);
 | 
						|
 | 
						|
</script></pre></body></html>  
 | 
						|
     |