Re: Disc 1 only has…
Hmmm, It depends. The following code with answer this questions.
/* Find out if you are opposite gender...version 2 already */
/* Just enter male or female at the prompt, or get ready for a nasty error */
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <string.h>
void main()
{
char gender[7];
char mygender] = "male";
int opposite;
puts("Please enter only male or female, other creatures not supported at this time");
printf("What\'s your gender\? ");
scanf("%s",&gender);
opposite=strcmp(gender,mygender);
if (opposite==0)
{
puts("Not an opposite gender");
getch();
}
else
{
puts("yohooooo, opposite gender");
getch();
}
return;
}