peterzig

Pin

Oct 27th, 2015
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. // ConsoleApplication5.cpp : Defines the entry point for the console application.
  2. //
  3. #include "stdafx.h"
  4. #include <conio.h>
  5. #include <iostream>
  6.  
  7. using namespace std;
  8.  
  9.  
  10.  
  11. int main()
  12. {
  13.     string pin;
  14.     printf("Witaj w naszym banku!\n");
  15.     printf("Podaj numer PIN: ");
  16.     scanf("%s", &pin);
  17.  
  18.     if (pin=="1729")
  19.     {
  20.         printf("Poprawny PIN\n");
  21.     }
  22.     else
  23.     {
  24.         printf("Niepoprawny PIN\n");
  25.     }
  26.  
  27.     _getch();
  28.  
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment