Hey, I'm trying to run this code:
Code:
#include <stdlib.h>
struct database {
int id_number;
int age;
int salary;
};
int main()
{
struct database john;
john.age = 19;
john.id_number = 33033;
john.salary = 80000;
struct database haley;
haley.age = 18;
haley.id_number = 34921;
haley.salary = 21000;
int input;
printf( "Please Enter The I.D. Number Of Employee To View Info: \n" );
scanf( "&d", &input );
switch ( input )
{
case 33033:
printf( " \n" );
printf( "Employee's name is John. \n");
printf( "John's age is: %d \n", john.age );
printf( "John's ID is is: %d \n", john.id_number );
printf( "John's salary is: %d \n", john.salary );
break;
case 34921:
printf( " \n" );
printf( "Employee's name is haley. \n");
printf( "haley's age is: %d \n", haley.age );
printf( "haley's ID is is: %d \n", haley.id_number );
printf( "haley's salary is: %d \n", haley.salary );
break;
}
getch();
}
When I run it it opens the "Please enter ID" part just fine, but when I enter in the I.D nothing happens. I can't seem to find what is wrong with the code, any help would be great.