Wednesday, June 27, 2007

Fibonacci Calculator in Visual C++

#include "stdafx.h"
#include

using namespace std;

int calculate_fibonacci(int n);

int main(int argc, char* argv[])
{
int n;
cout << "Enter n: "; cin >> n;
cout << "Fibonacci of " << int="" b="1," bb="0," return="" else="" if="" n="="> 1) {
for (i = 1; i < result =" 0;" bb =" b;" b =" result;">

1 comment:

  1. In case you didn't notice, it seems that you forgot to use character references for the greater-than and less-than signs, so the text between them is not viewable in my browser at least.

    ReplyDelete