Witam jestem początkującym i mam problem w moim małym programie.
Zależy mi na tym, aby program wyświetlał napis 'ok zalogowałeś się' gdy wpisze odpowiednie hasło w przeciwnym razie napisze 'Niepowodzenie' .
Problem w tym, że cokolwiek bym wpisał to mnie zaloguje.
Instrukja if a już problemy mam nadzieję, że ktoś mi pomoże.
#include <stdio.h>
main()
{
printf("=-----------------------------------------------------------------------=");
printf("\n\n=\t\t\tMilitary U.S.A. Department\t\t\t=");
printf("\n\n=-----------------------------------------------------------------------=");
int a,b;
printf("\n\n\n\tPlease select your city to connect with the server service. ");
printf("\n\n\n1.Waszyngton\n\n\n \n\nType number : ");
scanf("%d",&a);
switch(a)
{
case 1:
{
printf("\nType your password : ");
scanf("%d",&b);
if (b=="sukces")
printf("\n\t\t\tThank you for your attention.");
else
if (b!="sukces")
printf("\n\t\tLog in failed. Please contact with the service.");
}
break;
}
getch();
return 0;
}