Wednesday, August 3, 2022

RECURSIVE FUNCATION

#include<iostream>

using namespace std;



void fun( int n)

{

    if(n>0)

    {

        fun(n-1);

        cout<<n<<endl;

    }

}

int main()

{

    int x=25;

    fun(x);

}

No comments:

Post a Comment

CONSTRUCTURE IN PARENT CLASS

class Parent {     public Parent()     {         System.out.println("Parent Constrcutor");     }              } class Child extend...