Untitled
unknown
plain_text
3 years ago
820 B
6
Indexable
#include <fstream>
#include <iostream>
using namespace std;
//ostream &operator<< (ostream& out,const aboba &a) {
// out << a.name << " " << a.surname;
// return out;
//}
struct TACHKA {
char cvet;
int mosh;
string marka;
string model;
int pos;
float obiom;
int probeg;
};
int main()
{
TACHKA a;
ifstream file("baba.txt");
file >> a.cvet >> a.mosh >> a.marka >> a.model >>a.pos>> a.obiom >> a.probeg;
cout << a.cvet << endl << a.mosh << endl << a.marka << endl << a.model << endl<<a.pos<<endl << a.obiom << endl << a.probeg<<endl;
cin >> a.cvet;
a.probeg -=a.probeg;
cout << a.cvet << endl << a.mosh << endl << a.marka << endl << a.model << endl << a.pos << endl << a.obiom << endl << a.probeg << endl;
}
Editor is loading...