Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 6th, 2012  |  syntax: None  |  size: 0.72 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <iostream>
  2. #include <stdlib.h>
  3. using std::cin;
  4. using std::cout;
  5. int main ()
  6. {
  7.     char alfa[] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
  8.     char Password[33]={0},miaPass[33]= {0};
  9.     int i,j=0;
  10.     system("color 70");
  11.     cout<<"Inserisci la password:";
  12.     cin>>Password;
  13.  
  14.  
  15.     while(miaPass!=Password)
  16.     {
  17.         for (i=0;i<26;i++)
  18.         {
  19.             if (alfa[i] == Password[j])
  20.             {
  21.                 miaPass[j] = alfa[i];
  22.             }
  23.         }
  24.         j++;
  25.         break;
  26.     }
  27.     cout<<"La password e':"<<miaPass;
  28.  
  29.  
  30.  
  31.     getchar();getchar();getchar();getchar();
  32.     getchar();getchar();getchar();getchar();
  33. }