Advertisement
Guest User

C++ Codebeispiel von iTzFritz

a guest
Aug 30th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include <iostream>
  2. #include <windows.h>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     char arr[256];
  8.     int l;
  9.  
  10.     cout << "Gebe deinen Namen ein\n ohne Leerzeichen" << endl;
  11.     cin >> arr;
  12.  
  13.     l = strlen(arr);
  14.  
  15.     for(int i=0;i<l;i++) {
  16.  
  17.         if((arr[i]=='k'||arr[i]=='K')&&arr[i+1]=='e'&&arr[i+2]=='v'&&arr[i+3]=='i'&&arr[i+4]=='n') {
  18.             cout << "Blockiert !" << endl;
  19.             system("pause");
  20.             return 0;
  21.         }
  22.         else {
  23.         }
  24.     }
  25.  
  26.     cout << "Geschafft !" << endl;
  27.     system("pause");
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement