Hello World
#include using namespace std; int main() { cout<<"Hello world!\n"; cout<<"Hello world from cout ...\n"; return 0; }
Fibonacci Number
Program to find the Fibonacci Number by making series of the fibonacci number and then getting fibonacci number by index.
#include #include using namespace std; long fib(int index) { long number1 = 0; long number2 = 1; long next_number = 0; if (index < 2) return index; else { for (int i = 0 ; i < index ; i += 1) { next_number = number1 + number2; number1 = number2; number2 = next_number; } return number1; } }