the e commerce company buy sell goods processes its customer order through order id. the order id generated automatically by their system with the help of the customer order id. the order id can be positive or a negative number. the negative order id denotes the cancelled order by the customer. the company system takes the customer id as the first term and a common ratio R. the order id is the Nth term in the geometric progression of the series. write an algorithm in C language to generate the customer's order id?
Answers
Answered by
1
Answer:
you will get your answer in this
Explanation:
Attachments:
Answered by
0
Answer:
The C language to generate the customer's order ID as the following:
Explanation:
#include<stdio.h>
#include <stdlib.h> /* required for randomize() and random() */
#include <conio.h>
int main()
{
//Initialising array and variable
char* order[]=
int numberoforders;
int clientID = 0;
//Request how many orderID.
printf("order id: %u%03u\n", order_ID, rand() % 1000);
scanf("%d", &numberoforders);
//Loop for the ammount of order made.
srand(time(NULL));
int i=0;
while (i<(numberoforders))
{
int randomorderID = rand()%7;
printf("%s\n", r [orderID]);
i++;
}
getch();
return 0;
}
#SPJ3
Similar questions