/stores and retrieves data for two secret asgents
#include<stdio.h>
void main ()
{
struct personnel {
char name [30];
int agnumb; int agent;
};
struct personnel agent1;
struct personnel agent2;
char numstr[81];
printf("\nagent 1.)\nEnter name:");
printf("Enter agent number (3 digits): ");
gets(numstr);
agent1.agnumb=atoi(numstr);
gets(agent2.name);
printf("Enter agent number (3 digits);");
gets(numstr);
agent2.agnumb=atoi(numstr);
printf("\nList of agents:\n);
printf("Agent number: %03d\n", agent1.agnumb);
printf("Name: %s\n", agent2.name);
printf(Agent number: %3d \n", agent2.agnumb);
}
i would also like to use arrays so that the stucture can store and retrieve data of 20 agents. pls hel