-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSource.cpp
More file actions
61 lines (55 loc) · 1.68 KB
/
Source.cpp
File metadata and controls
61 lines (55 loc) · 1.68 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include<Windows.h>
#include<iostream>
#include<string>
#include <iostream>
using namespace std;
using std::string;
using std::cout;
using std::endl;
void studentInformationModel()
{
//ϲÁ
string studentFullName = "Ñòóäåíò 1";
//²äåíòèô³êàòîð ñòóäåíòà/çàë³êîâî¿ êíèæêè
unsigned short int studentID = 1;
//³ê ó÷íÿ
unsigned short int studentAge = 22;
//Ïîòî÷íèé ð³ê íàâ÷àííÿ
unsigned short int currentStudyYear = 1;
//×è íàâ÷àºòüñÿ ñòóäåíò?
bool isStuding = true;
//Çàêëàä îñâ³òè
string university = "ÍÏÓ ³ì. Äðàãîìàíîâà";
//Àäðåñà ó÷íÿ
string originAdress = "×åðí³ã³â, Óêðà¿íà";
//Îñâ³òí³é ñòóï³íü
string degree = "Ìàã³ñòðàòóðà";
//Íàâ÷àëüíà ãðóïà
string group = degree + to_string(currentStudyYear);
unsigned int totalMemoryInBytes = sizeof(studentFullName) +
sizeof(group) +
sizeof(studentID) +
sizeof(studentAge) +
sizeof(currentStudyYear) +
sizeof(isStuding) +
sizeof(originAdress) +
sizeof(university) +
sizeof(degree);
cout << "ϲÁ ñòóäåíòà:\t\t" << studentFullName << endl;
cout << "Ãðóïà:\t\t\t" << group << endl;
cout << "Íîìåð çàë³êîâî¿ êíèæêè:\t" << studentID << endl;
cout << "³ê ñòóäåíòà:\t\t" << studentAge << endl;
cout << "гê íàâ÷àííÿ:\t\t" << currentStudyYear << endl;
cout << "×è ùå íàâ÷àºòüñÿ:\t" << ((isStuding) ? "Òàê" : "ͳ") << endl;
cout << "Àäðåñà:\t\t\t" << originAdress << endl;
cout << "Çàêëàä îñâ³òè: \t\t\t" << university << endl;
cout << "Îñâ³òí³é ñòóï³íü:\t" << degree << endl;
cout << "Çàãàëüíèé îá'ºì âèêîðèñòàíî¿ ïàì'ÿò³ (â áàéòàõ):\t" << totalMemoryInBytes << endl;
}
int main()
{
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
studentInformationModel();
return 0;
}