#include <stdio.h>
int main(void)
{
printf("Please Enter Pin Number");
scanf("pin=1234");
if ("pin=1234") {
printf("Correct Pin");
} else {
printf("Incorrect Pin");
}
return 0;
}
I'm taking a programming course for the first time as part of engineering, and I have no idea what to do here. I got this far, but how do I make it only type Correct Pin when 1234 is entered? When I run the program..it says Correct Pin for ANY number entered.
int main(void)
{
printf("Please Enter Pin Number");
scanf("pin=1234");
if ("pin=1234") {
printf("Correct Pin");
} else {
printf("Incorrect Pin");
}
return 0;
}
I'm taking a programming course for the first time as part of engineering, and I have no idea what to do here. I got this far, but how do I make it only type Correct Pin when 1234 is entered? When I run the program..it says Correct Pin for ANY number entered.