sum and product of natural nos in c++

                                        for loop examples

//sum of first 10 natural numbers
//use header files syntax according to the compiler

#include<conio.h>
#include<iostream.h>
void main()
{
 int sum=0;
 for (int i=1;i<=10;i++)
  {
    sum=sum+i;
  }
 cout<<sum;
 getch();
 } 
 
// product of first 10 natural numbers
//use header files syntax according to the compiler
#include<conio.h>
#include<iostream.h>
void main()
{
 int product=1;
 for (int i=1;i<=10;i++)
  {
    product=product*i;
  }
 cout<<product;
 getch();
 } 
 
// factorial of a number
//use header files syntax according to the compiler
#include<conio.h>
#include<iostream.h>
void main()
{
 unsigned int fact=1;
 int num;
cout<<"enter a number ";
cin>>num;
 for (int i=1;i<=num;i++)
  {
    fact=fact*i;
  }
 cout<<fact;
 getch();
 } 

 
//Fibonacci Series Display
 
//use header files syntax according to the compiler
#include<conio.h>
#include<iostream.h>
void main()
{
 int a,b,c;
 a=0,b=1;
 cout<<a<<" "<<b<<" ";
 for (int i=1;i<8;i++)
  {
      c=a+b;
      cout<<c<<" ";
      a=b;
      b=c;
      
  } 
getch()
 }