All pastes #730147 Raw Edit

Stuff

public text v1 · immutable
·published 2007-10-08 23:10 UTC
rendered paste body
#include <iostream>
using namespace std;

void main()
{
	//define array. type name[x] where x is rows.

	char order[5];
	int i;

	//make sure x = 0

	i = 0;

	//start loop

	for (i; i<5; i++)

	{
		/* since array starts with 0, order 1 is array[0], "would start with enter order 0"
		   hence the enter order number i+1
		*/
		cout << "Enter Order Number " << i+1 << " :" << endl;
		// Input order array[i]
		cin >> order[i];
	}


	

	// output crap

	cout << "Order One Is: " << order[0] << endl;
	cout << "Order Two Is: " << order[1] << endl;
	cout << "Order Three Is: " << order[2] << endl;
	cout << "Order Four Is: " << order[3] << endl;
	cout << "Order Five Is: " << order[4] << endl;
}






Output:

Enter Order Number 1 :
Cheese
Enter Order Number 2 :
Crackers
Enter Order Number 3 :
Poo
Enter Order Number 4 :
OnA
Enter Order Number 5 :
Stick
Order One Is: Cheese
Order Two Is: Crackers
Order Three Is: Poo
Order Four Is: OnA
Order Five Is: Stick
Press any key to continue . . .