im looking to make a program in c that will print out a specific number of pizzas (defined by the user), these pizzas will be called at random from a pre-defined array. So far so good, but now im looking to add a unique order id to the pizzas when they are ordered. I'm having issues with this and cant seem to get my head around how to do it (i am very new to c) so any help would be much appreciated. If there was a way to then list these "orders" any help on that would also be fantastic.
#include<stdio.h>
#include <stdlib.h> /* required for randomize() and random() */
#include <conio.h>
int main()
{
//Initialising array and variable
char* pizza[]={"Marinara","Prosciutto","Prosciutto e Funghi","La Napoletana","L Atomica","Quattro Stagioni","Capricciosa"};
int numberofpizza;
int clientID = 0;
//Request how many pizzas for that order.
printf("How many pizzas would you like? ");
scanf("%d", &numberofpizza);
//Loop for the ammount of pizzas made.
srand(time(NULL));
int i=0;
while (i<(numberofpizza))
{
int randompizza = rand()%7;
printf("%s\n", pizza[randompizza]);
i++;
}
getch();
return 0;
}