RSS Forums RSS
Please support our C++ advertiser: Programming Forums

Array

Join Date: Jul 2005
Posts: 47
Reputation: karen_CSE is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
karen_CSE karen_CSE is offline Offline
Light Poster

Re: Array

  #3  
Jul 18th, 2005
hi, thanks so much for the reply
however, when i try to run the program, it said "i is an undeclared indentifier."
what do I do?

#include <iostream.h>

void main(void)
{
int array[10], count, even, odd;
cout << "enter 10 values:\n";
for (count = 1; count < 10; count++)
{
cout << "Enter an integer value:";
cin >> array[count];
}

if(!count[i] % 2) // if divisible by 2, then returns zero, negates to 1, enters if
even[i] = count[i];
else
odd[i] = count[i];

}
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:43 am.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC