Results 1 to 3 of 3

Thread: (++)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Jan:2009
    Location:
    Posts: 16

    (++)

    , , , ( )

    #include <iostream>
    #include <string>
    using namespace std;
    int main()

    {

    char str[100];
    cout << "Enter a word to check if it is a palindrome:";
    cin >> str;
    int x = strlen(str)-1;
    for(int i = 0; i <= x; i++)
    {
    if (str[i] == str[x-i])
    {
    continue;
    }
    else
    {
    cout<<"NO"<<endl;
    system ("pause");
    return 0;
    }
    }
    cout << "YES"<<endl;
    system ("pause");
    return 0;
    }


    :

    char str[100];
    cout << "Enter a word to check if it is a palindrome:";
    cin >> str;
    int x = strlen(str)-1;
    for(int i = 0; i <= x; i++)
    {
    if (str[i] == str[x-i])

    ----------------------------
    char str ?

    ? ? !

  2. #2
    ! vbTheKing's Avatar
    Join Date: Sep:2003
    Location:
    Posts: 4,138
    / .
    , , - :
    1.
    2. ,
    3. .
    ''? * *
    - !
    ...

  3. #3
    Registered User
    Join Date: Jan:2009
    Location:
    Posts: 16
    Gracias!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |