<head>
<script>
function a(){
var b = document.getElementById("b")
document.getElementById("a").value= "123455677"
var array = new Array()
for(n=1n <21 n++)
if(n==1 || n==2){
array[n] = "1"
b.innerText = b.innerText + "1" + "/"
}else{
array[n] = Number(array[n-1]) + Number(array[n-2])
b.innerText = b.innerText + array[n] + "/"
}
}
</script>
</head>
<body onload="a()">
<div id="a">
<table border="1">
<tr>
<td width="150" height="50" id="b" ></td>
</tr>
</table>
</div>
</body>
</html>
赋值粘贴就可以 想要多少位的 自己控制一下FOR
#include<stdio.h>int main()
{
int n,i=1
double a=1,b=1
scanf("%d",&n)
if(n==1)
printf("1")
else if(n==2)
printf("1 1")
else
{
printf("1 1")
for(i=3i<=ni++)
{
b=a+b
a=b-a
printf(" %.f",b)
}
}
printf("\n")
return 0
}