From: Devik <dev...@ya...> - 2001-01-17 17:04:35
|
Hi I am a student learning c++ and have written a program to displace = fibonacci numbers till the value entered by the user. This program = doesnt compile in DevC++ showing some linker errors however it does = compile in Visual c++. Any Ideas on whats wrong ? Thanks Devik Here's the code /* This Program Displays N Fibonacci Numbers */ #include<iostream.h> void main() { int c,a=3D1,b=3D1,newno,n; cout<<"Enter the value of n "; cin>>n; cout<<"\nThe N Fibonacci Numbers are \n"; cout<<a<<" "<<b<<" "; for(c=3D2;c<=3Dn;c++) { newno=3Da+b; a=3Db; b=3Dnewno; cout<<newno<<" "; } } |