Yes i read the link. (bizzilion times now) and i think i still quite cant gett it :?
But what about this and can someone point out what is wrong ?
Thanks.
Code:
/***************************/
/**Program made by Nesiory**/
/****All Rigths Reserved****/
/***************************/
#include <stdio.h>
int main()
{
char name[20];
char color[20];
char key[20];
/**Question ........../
printf("What is your name?");
scanf("%s",name);
if (strcmp(name,"david") != 0) /** Change (name,"ThisChange") to change name **/
{
puts("Get away from the pc!");
sleep(5);
return(0);
}
/**Question B**/
printf("What is your favorite color?");
scanf("%s",color);
if (strcmp(color,"blue") != 0) /** Change (color,"ThisChange") to change color **/
{
puts("Get away from the pc!");
sleep(5);
return(0);
}
/**Question C**/
printf("What is the master key?");
scanf("%s",key);
if (strcmp(key,"david") != 0) /** Change (Key,"ThisChange") to change master key **/
{
puts("Get away from the pc!");
sleep(5);
return(0);
}
/**Sulution**/ /** Change (Password is "ThisChange"\n",name,color) to change the final password **/
printf("%s’s favorite color is %s, oh i forgot...the password is david\n",name,color );
return(0);
}