Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int stringsize(char str[1337])
- {
- int i = 0;
- while (str[i] != '\0')
- {
- i++;
- }
- return i;
- }
- //char Кто_катает_мой_код (char быдлокодер[]);
- bool palindrom(char input[1337])
- {
- bool IsPalindrom = false;
- long long i = 0, size = stringsize(input) - 1;
- while (i < size / 2)
- {
- system("color A0");
- system("color B0");
- system("color C0");
- system("color D0");
- system("color E0");
- system("color F0");
- if (input[i] != input[size - i])
- {
- IsPalindrom = false;
- return IsPalindrom;
- }
- else
- {
- IsPalindrom = true;
- }
- i++;
- }
- return IsPalindrom;
- }
- int main()
- {
- setlocale(LC_ALL, "russian");
- system("title ILITARNAYA_PROGA");
- char input[1337];
- cin >> input;
- if (palindrom(input) == true)
- {
- cout << "CTPOKA--ПАЛИНДРОМOMOMOMOM,_ёпта!";
- }
- else
- {
- cout << "CTPOKA--НЕ_ПАЛИНДРОМOMOMOMOM,_ёпта!";
- }
- system("color 17");
- cout << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment