,   CyberForum.ru

- C++

 
Despot777
1 / 1 / 0
: 14.09.2013
: 118
31.10.2013, 21:10     #1
?
.
C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
void spisok()
{   
    cout <<"Ïðîñìîòð ïîë*îãî ñïèñîê* *âòî."<<endl;
    
    ifstream F("automobile.txt");
    
    int i = 1;
    while(!F.eof())
    {
        F.ignore();
        F >> am.a >> am.b >> am.c >> am.d >> am.e >> am.f >> am.h >> am.i >> am.j;
        
        cout << "\t************************* " << i++ << "-é *âòîìîáèëü *************************\t"<< endl;
        cout << "Ì*ðê* *âòîìîáèëÿ: |\t" << am.a << endl;
        cout << "Òèï êóçîâ*:       |\t" << am.b << endl;
        cout << "Îáúåì äâèã*òåëÿ:  |\t" << am.c << endl;
        cout << "Ãîä âûïóñê*:      |\t" << am.d << endl;
        cout << "Êîðîáê* ïåðåä*÷:  |\t" << am.e << endl;
        cout << "Öâåò *âòîìîáèëÿ:  |\t" << am.f << endl;
        cout << "Öå** *âòîìîáèëÿ:  |\t" << am.h << endl;
        cout << "ÔÈÎ ïðîä*âö*:     |\t" << am.i << endl;
        cout << "Êî*ò*êò*ûé *îìåð: |\t" << am.j << endl;
        cout << endl;
    }
    
    F.close();
    
    system("pause");
    system("cls");
}
.
C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
void ad()
{   cout <<"Ïó*êò ìå*þ ñîçä**èå îáúÿâëå*èÿ ** ïðîä*æó *âòî"<<endl;
    ofstream F("automobile.txt", ofstream::app);  
    
    cout << "Ââåäèòå ì*ðêó *âòîìîáèëÿ: ";
    cin >> am.a;
    cout << "Ââåäèòå òèï êóçîâ*: ";
    cin >> am.b;
    cout << "Ââåäèòå îáúåì äâèã*òåëÿ: ";
    cin >> am.c;
    cout << "Ââåäèòå ãîä âûïóñê*: ";
    cin >> am.d;
    cout << "Ââåäèòå êîðîáêó ïåðåä*÷: ";
    cin >> am.e;
    cout << "Ââåäèòå öâåò *âòîìîáèëÿ: ";
    cin >> am.f;
    cout << "Ââåäèòå öå*ó *âòîìîáèëÿ: ";
    cin >> am.h;
    cout << "Ââåäèòå ÔÈÎ ïðîä*âö*: ";
    cin >> am.i;
    cout << "Ââåäèòå Êî*ò*êò*ûé *îìåð: ";
    cin >> am.j;
    F << "\n" << am.a << "\n" << am.b << "\n" << am.c << "\n" << am.d << "\n" << am.e << "\n" << am.f << "\n" << am.h << "\n" << am.i << "\n" << am.j;
    F.close();
     
     system("pause");
     system("cls");
     
}
Similar
41792 / 34177 / 6122
: 12.04.2006
: 57,940
31.10.2013, 21:10    
:

( - ). C++
C++ /
- C++ C++
C++
C++
C++
C++
C++ -



:
.
MrGluck
 ++
   MrGluck
4920 / 2663 / 243
: 29.11.2010
: 7,405
01.11.2013, 02:01     #2
Despot777
?
cin.getline() / getline(cin, ). , , '\n', cin.ignore()
Yandex
01.11.2013, 02:01    

: 23:46. GMT +3.
- , ,
-
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
@Mail.ru