WAP USING STATIC FUNCTION

 

#include<iostream.h>
#include<conio.h>
void show(  );
void main()
{
     clrscr();
     cout<<”\n”;
     for(int k=0;k<5;k++)
     {
           show(  );
           cout<<”\t”;
     }
      getch();
}
Void show(  )
{
       Static int n=6;
       n=n+1;
       cout<<n;
}


Comments

Popular Posts