Password (to lose three times)

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>

int main ()
{
 int I = 0;
 for (; I <. 3; I ++)
 {
  char password [1024] = {0};
  the printf ( "Enter password:");
  Scanf ( "% S", & password);
  IF (strcmp (password, "888888") == 0)
  {
   printf ( "a successful login \ the n-!");
   BREAK;
  }
  the else {
   printf ( "You entered incorrectly \ the n-.");
  }
  IF (i = 3 =) {
   printf ( "You have been unsuccessful attempts to enter the \ the n-");
  }
 }

 system("pause");
 return 0;
}

Guess you like

Origin www.cnblogs.com/Leafbud/p/12584201.html