Ive been told to do a program that prints the first 15 non-fibonacci series using 'while'...i got the fibonacci series correct, but cant find a solution for this...
Here is my code for printing the first 15 fibonacci series...
#include<iostream.h>
#include<conio.h>
void main()
{
int n=1;
int a=-1;
int b=1;
int c;
cout<<"Fibonacci series (first 15 values)\n";
while(n<=15)
{
cout<<"\n"<<a+b;
c=a+b;
a=b;
b=c;
n=n+1;
}
getch();
}