Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int length, data1;
- string data2;
- //arrays start at Zero, Length cannot be more then size, because that is out of the array, add to length each loop
- for(length = 0; length > SIZE; length++)
- {
- cout << "ask for data";
- cin >> give data
- //validate your data here
- birdType[length] = data
- cout << "ask for data2";
- cin >> give data2
- //validate your data2 here
- numberOfBirdsSeen[length] = data2
- }
- //to Print out the data instead of SIZE we use Length. this makes sure we only print Valid data.
- //ctr is just counter name, it can be anything
- for(ctr = 0; ctr < length; ctr++)
- {
- //print out your data like this, it can be to Cout or Fout.
- // use setw for formating, so you can copy her presentation
- //your completed copy should be to fout.
- cout << birdType[length];
- cout << numberOfBirdsSeen[length];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement