#include <stdio.h>
#include <time.h>
#include <stdlib.h>
int main()
{
char names[10][10], name[10], gender;
printf("Welcome to Autumn sim");
names = ["Nathan", "August", "Bob", "Joe", "Stewart", "Martha", "Tiffany", "Darlene", "Kate", "Sophie"];
printf("What is your gender? m or f?\n");
scanf("%c", &gender);
if (gender == "m" || "M")
{
name = names[rand(0, 4)][10];
}
else if (gender == "F" || "f")
{
name = names[rand(5, 9)][10];
}
printf("Your name is...");
printf("Loading");
printf("%s", name);
return 0;
}
This is my program. I am trying to ask gender and randomly give their name. There are five names if they are male and other five names if they are female. But it keep saying !expression must be identifiable 1 value! which I cannot understand. please somebody help me!!! Also, I want to know how to wait in c, I want to wait after "Loading".