Answers for "void count(int n) { if (n<0) cout << "n must be positive.." << endl; else if (n>10) cout << "done counting..." << endl; else { cout << n << endl; count (n+1); } }"

0

void count(int n) { if (n<0) cout << "n must be positive.." << endl; else if (n>10) cout << "done counting..." << endl; else { cout << n << endl; count (n+1); } }

void count(int n)
  {
    if (n<0)
      cout << "n must be positive.." << endl;
    else if (n>10)
     cout << "done counting..." << endl;
   else
    {
      cout << n << endl;
      count (n+1);
     }
}
Posted by: Guest on October-15-2021

Code answers related to "void count(int n) { if (n<0) cout << "n must be positive.." << endl; else if (n>10) cout << "done counting..." << endl; else { cout << n << endl; count (n+1); } }"

Browse Popular Code Answers by Language