Commit 54df2db5 authored by Егор Сальков's avatar Егор Сальков
Browse files

Upload New File

parent 07cde2de
No related merge requests found
Pipeline #1094 canceled with stages
Showing with 61 additions and 0 deletions
+61 -0
Apteka.h 0 → 100644
//
// Created by Egor Salkov on 17.12.2020.
//
#pragma once
#include <iostream>
#include <string>
using namespace std;
struct Apteka_st{
//!номер аптеки
int number;
//!название препарата
string name;
//!количество упаковок
int NumberOfPackages;
//!цена
int cost;
//! дата поставки
string data;
//!срок хранения (в днях)
int time;
friend std::istream& operator>>(std::istream& In, Apteka_st& other) {
cout << "\nВведите номер аптеки : ";
In >> other.number;
cout << "\nВведите название препарата : ";
In >> other.name;
cout << "\nВведите его количество : ";
In >> other.NumberOfPackages;
cout << "\nВведите его цену : ";
In >> other.cost;
cout << "\nВведите дату поступления : ";
In >> other.data;
cout << "\nВведите срок хранения : ";
In >> other.time;
cout <<endl;
return In;
}
friend std::ofstream& operator<<(std::ofstream& out, Apteka_st& other) {
cout << "\nНомер аптеки : ";
out << other.number;
cout << "\nНазвание препарата : ";
out << other.name;
cout << "\nКоличество : ";
out << other.NumberOfPackages;
cout << "\nЕго цена : ";
out << other.cost;
cout << "\nДата поступления : ";
out << other.data;
cout << "\nСрок хранения : ";
out << other.time;
cout <<endl;
return out;
}
};
//#ifndef SEM3_DZ1_APTEKA_H
//#define SEM3_DZ1_APTEKA_H
//
//#endif //SEM3_DZ1_APTEKA_H
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment