diff --git a/edit-array.html b/edit-array.html new file mode 100644 index 0000000..f68cd11 --- /dev/null +++ b/edit-array.html @@ -0,0 +1,19 @@ +edit-array + + + + + + + + + + + + edit-array + + + + + + \ No newline at end of file diff --git a/fibonacci.html b/fibonacci.html new file mode 100644 index 0000000..62e97dd --- /dev/null +++ b/fibonacci.html @@ -0,0 +1,18 @@ +fibonacci + + + + + + + + + + + fibonacci + + + + + + \ No newline at end of file diff --git a/js/slide22.js b/js/slide22.js index e69de29..cdded61 100644 --- a/js/slide22.js +++ b/js/slide22.js @@ -0,0 +1,9 @@ +let user= prompt("Enter a number greater than 0 and less than 100: ") + + +while(user>=100 || user<=0) +{ + user=prompt("Re-enter a number greater than 0 and less than 100: ") +} +user=user*user +document.write("\n"+user) diff --git a/js/slide23.js b/js/slide23.js index e69de29..cb5a870 100644 --- a/js/slide23.js +++ b/js/slide23.js @@ -0,0 +1,7 @@ +let lower=prompt("Please enter L: "); +let upper=prompt("Please enter U: "); + +for(let i=lower;i0 && position<10){ + let choice=prompt("input value"); + firstArray[position]=parseInt(choice); + position=prompt("input index") +} +console.log(firstArray); +console.log("index out of range!. goodbye :(") \ No newline at end of file diff --git a/js/slide26.js b/js/slide26.js index e69de29..c3aeb0d 100644 --- a/js/slide26.js +++ b/js/slide26.js @@ -0,0 +1,29 @@ + +var input =prompt("Enter a number for a fibioncci sequence") +input=parseInt(input); +var f=[]; +f[0]=0 +f[1]=1 + +while(input>59 || input<0) +{ + input=prompt("Re-enter a number for a fibioncci sequence") +} + +if(input==0) +{ + console.log(f[0]) +} + +if(input==1) +{ + console.log(f[1]) +} + + + +for(var i=2;i<=input;i++) +{ + f[i]=f[i-2]+ f[i-1] + console.log(f[i]+"\n\t"); +} \ No newline at end of file diff --git a/print-interval.html b/print-interval.html new file mode 100644 index 0000000..481b5ec --- /dev/null +++ b/print-interval.html @@ -0,0 +1,18 @@ +print-interval + + + + + + + + + + + print print-interval + + + + + + \ No newline at end of file