Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Егор Сальков
DZ1_sem2
Commits
54df2db5
Commit
54df2db5
authored
4 years ago
by
Егор Сальков
Browse files
Options
Download
Patches
Plain Diff
Upload New File
parent
07cde2de
master
No related merge requests found
Pipeline
#1094
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Apteka.h
+61
-0
Apteka.h
with
61 additions
and
0 deletions
+61
-0
Apteka.h
0 → 100644
+
61
−
0
View file @
54df2db5
//
// 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
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets