[ create a new paste ] login | about

Link: http://codepad.org/q9ZwjLtR    [ raw code | output | fork ]

C, pasted on Jul 19:
#include <stdio.h>
#include <string.h>//Arquivo com o protótipo da função strcmp.


int main(void) {

   char login[255], senha[50];
   int teste = 1 ;

   while (teste) {

   printf("Digite seu login:\t");
   gets(login);
   printf("Digite sua senha:\t");
   gets(senha);

   system("cls");
   
   //A função strcmp retorna verdadeiro caso as strings sejam diferentes.
   if (strcmp(login,senha)){
      printf("Logado com sucesso !\n\n");
      break;//Interrompe o laço caso seja logado
      }
   else
       printf("Login e senha invalidos!\n\n");

  
   }
system("PAUSE");
return 0;
}


Output:
1
Disallowed system call: SYS_fork


Create a new paste based on this one


Comments: