View Single Post
Old 10-11-2004, 10:49 AM   #1 (permalink)
Androto
Mac Os X User(I hate win)
 
Join Date: Oct 2004
Posts: 138
Androto is on a distinguished road
Is there anyting wrong with this?

Code:
 #include <iostream>
#include <cstdlib>

using namespace std;
int oddy (int x(1), int y);
int main()
  oddy;
  cout<< "\n";
          
  system("PAUSE");  
  return 0;
}

int oddy (int x, int y)
{
  while (x<=10)
  {
    y = x % 2;
    if (y==1)
    {
      cout << x << " is odd" << endl;
      x++;
    }
      else
    {
        cout << x << " is even" << endl;
      x++;
    }
  }
  return 0
}

Last edited by Valmont; 10-11-2004 at 02:07 PM.
Androto is offline   Reply With Quote