Results 1 to 7 of 7

Thread:

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Jul:2010
    Location: Plovdiv
    Posts: 28

    .
    Person
    1.
    2. ( F)
    3.
    4.
    .
    1. 7 Person
    2. .
    - .

    #include <iostream>
    #include <string>
    using namespace std;
    struct rabotnik
    {
    string name;
    char sex[1];
    string dlujnost;
    int zaplata;
    }person [5];
    int main() {
    for (int i = 0; i < 5; i++)
    {
    cout << i + 1 << " Ime: ";
    cin >> person[i].name;
    cout << i + 1 << " Pol M ili ";
    cin >> person[i].sex;
    cout << i + 1 << " Dlujnost: ";
    cin >> person[i].dlujnost;
    cout << i + 1 << " Zaplata: ";
    cin >> person[i].zaplata;
    }
    cout<<endl;
    int sr;
    char ch=1;
    ch=person[i].sex;
    for (int i = 0; i < 5; i++) {
    if ( person[i].zaplata=='M')
    sr=....
    }
    else if ( person[i].zaplata=='F'){
    sr=..
    }
    system("PAUSE");
    return 0;
    }

  2. #2
    ! vbTheKing's Avatar
    Join Date: Sep:2003
    Location:
    Posts: 4,138
    , :
    1. 7 Person

    . , , .

    4 .
    Code:
    char ch=1;
    ch=person[i].sex;
    for (int i = 0; i < 5; i++) {
    if ( person[i].zaplata=='M')
    ''? * *
    - !
    ...

  3. #3
    Registered User
    Join Date: Jul:2010
    Location: Plovdiv
    Posts: 28
    5 .

    #include <iostream>
    #include <string>
    using namespace std;
    struct rabotnik
    {
    string name;
    char sex[1];
    string dlujnost;
    int zaplata;
    }person [7];
    int main() {
    for (int i = 0; i < 7; i++)
    {
    cout << i + 1 << " Ime: ";
    cin >> person[i].name;
    cout << i + 1 << " Pol M ili ";
    cin >> person[i].sex;
    cout << i + 1 << " Dlujnost: ";
    cin >> person[i].dlujnost;
    cout << i + 1 << " Zaplata: ";
    cin >> person[i].zaplata;
    }
    cout<<endl;
    int sr;
    char ch=1;
    ch=person[i].sex;
    for (int i = 0; i < 7; i++) {
    if ( person[i].zaplata=='M')
    sr=....
    }
    else if ( person[i].zaplata=='F'){
    sr=..
    }
    system("PAUSE");
    return 0;
    }


  4. #4
    ! vbTheKing's Avatar
    Join Date: Sep:2003
    Location:
    Posts: 4,138
    Quote Originally Posted by UnL1m1t3D View Post
    , . " ch char...", "=1" , .
    ''? * *
    - !
    ...

  5. #5
    Registered User
    Join Date: Jul:2010
    Location: Plovdiv
    Posts: 28
    . ch. . .

  6. #6
    ! vbTheKing's Avatar
    Join Date: Sep:2003
    Location:
    Posts: 4,138
    , .
    - , .

    ---------- Post added at 21:26 ---------- Previous post was at 20:53 ----------

    , .
    ch=person[i].sex; for . - , , . , . , sborZaplatiMaje/broiMaje .
    ''? * *
    - !
    ...

  7. #7
    Registered User
    Join Date: Jul:2010
    Location: Plovdiv
    Posts: 28

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 |