Felanpro

Weird Test

Dec 29th, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     string name;
  10.     char testArray[5] = { 'F', 'e', 'l', 'i', 'x' };
  11.  
  12.     cout << "Type in your name: ";
  13.     cin >> name;
  14.  
  15.     if (name[0] == testArray[0])
  16.     {
  17.         cout << "Wow my name also starts with a F" << endl;
  18.         system("pause");
  19.     }
  20.     else
  21.     {
  22.         cout << "Cool name I guess.." << endl;
  23.         system("pause");
  24.     }
  25.  
  26.     return 0;
  27. }
Add Comment
Please, Sign In to add comment