Untitled

 avatar
unknown
plain_text
2 years ago
946 B
3
Indexable
#include <iostream>
#include <string>;
#include <fstream>
using namespace std;

struct Тачка {
	char color;
	int power;
	string mark;
	string model;
	int qual;
	float volume;
	int running;

};

int main()
{
	int newrunning;
	char newcolor;
	setlocale(LC_ALL, "Russian");
	Тачка Напродажу;
	ifstream in("one_car.txt");
	in >> Напродажу.color >> Напродажу.power >> Напродажу.mark >> Напродажу.model >> Напродажу.qual >> Напродажу.volume >> Напродажу.running;
	cout << "До скольки скрутить пробег?" << endl;
	cin >> newrunning;
	Напродажу.running = newrunning;
	cout << "Новый цвет?" << endl;
	cin >> newcolor;
	Напродажу.color = newcolor;
	cout << "У " << Напродажу.mark << ' ' << Напродажу.model << " скручен пробег.Можно продавать!";
}
Editor is loading...