Print Fibonacci Series in C++

Watch out! This tutorial is over 6 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

A “Fibonacci series” is a series of numbers in which each number ( Fibonacci number ) is the sum of the two preceding numbers. The simplest is the series 1, 1, 2, 3, 5, 8, etc. To print a Fibonacci series in C++, you have to ask the user to enter the total number of terms that he/she want to print fibonacci series upto the required number.

Continue reading

Hello World in C++

Watch out! This tutorial is over 8 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

This is how you would display “Hello World” in C++.

#include <iostream>

int main()
{
  std::cout << "Hello World!";
}

 

Hello World in C

Watch out! This tutorial is over 8 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

This is how you would display “Hello World” in C.

#include<stdio.h>

main()
{
    printf("Hello World");

}