while(count< = n) { fibn = fib0 + fib1; if( (fibn< 0)||(fibn ULLONG_MAX)){This program was compiled on MS Visual C++ 08/*Fibonacci Numbers*/#include<stdio.h>#include<limits.h>void fibonacci(int n){unsigned long long fib0 = 0; /*First Fibonacci Number*/unsigned long long fib1 = 1; /*Second Fibonacci Number*/unsigned long long fibn = 1; /*Nth Fibonacci Number*/int count = 3; /*Hold Count*/printf(" 1 :%25llu \n 2 :%25lld \n",fib0,fib1);while(count <= n ){fibn = fib0 + fib1 ;if((fibn < 0) || (fibn ULLONG_MAX)){ 这里你需要if(fibn< fib0 || fibn< fib1) 无符号数字无声地换行。 你需要一个巨大的整数库来有效地计算高斐波纳契数 。 - 免费游戏和编程好东西。 http://www.personal.leeds.ac.uk/~bgy1mm 这篇关于无符号长期溢出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 06-24 13:52