From: Matt H. <wm...@ne...> - 2001-01-17 18:02:24
|
Hi Devik, I copied and pasted your code below and compiled it using Dev-C++ and = there were no errors found. It compiled fine but I could not run it = successfully (which must be a problem with my compiler - as all my = programs have compiled fine but refuse to run). Best of luck!=20 ----- Original Message -----=20 From: Devik=20 To: dev...@li...=20 Sent: Wednesday, January 17, 2001 10:56 AM Subject: [Dev-C++] (no subject) 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<<" "; } } |