Write the program for fibonacci in c++?
Answer Posted / psrthipan j
#include<iostream.h>
int main()
{
int x,y;
x=y=1;
while(x<20)
{
cout<<y<<end 1;
x=x+y;
y=x-y;
}
return 0;
}
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator
What is private public protected in c++?
Where must the declaration of a friend function appear?
why and when we can declar member fuction as a private in the class?
Perform addition, multiplication, subtraction of 2-D array using Operator Overloading.
Can you pass an array to a function in c++?
What is the role of copy constructor in copying of thrown objects?
Is c++ a programming language?
What do you mean by friend class & friend function in c++?
What is the best way to declare and define global variables?
Write a program to add three numbers in C++ utilizing classes.
Write a program to concatenate two strings.
Differentiate between an inspector and a mutator ?
why is iostream::eof inside a loop condition considered wrong?
Can we specify variable field width in a scanf() format string? If possible how?