I cant get my intended result I want my program to display can anyone help me. The program is to print the workers name who are listed in the struct and if you don't enter any of those names I should print worker name doesn't exist. Can someone tell me the code/ syntax to use
Here is what I have
#include <stdio.h>
#include <conio.h>
#include <string.h>
//Program Purpose: To accept a specific set of worker names and worker id number and accept the time they came to work and determine if they were early or late for the day.`
struct workers {
char Worker_name[10];
int Worker_Id;
} workers;
int main ()
{
struct workers worker1;
struct workers worker2;
strcpy (worker1.Worker_name, "Sean");
worker1.Worker_Id = 1234;
strcpy (worker2.Worker_name,"Tajae");
worker2.Worker_Id = 7890;
char Worker_name [10];
int Worker_Id;
float Time_Arrived;
float Minutes_Late;
float Extra_Minutes;
float Minutes_Early;
float lunch_time;
float Departure;
printf("******************Produce Pro Time Management System********************\n\n");
printf("Good morning. Welcome to Produce Pro, Hope you had a good nights rest and ready to have a successful day at work today.\n\n");
printf("Please follow the instruction and answer with the required details\n");
printf("Note brief: All time are in army hours\n\n");
printf("Enter your Worker Name\n");
scanf("%S",&Worker_name[10]);
if (Worker_name= worker1,worker2) // this is the error in the program//
{
printf(&Worker_name[10]);
}
else
{
printf ("Worker Name doesn't exist");
}
}