initial commit

This commit is contained in:
2023-07-16 13:23:25 +00:00
commit c3fa5367c3
85 changed files with 4921 additions and 0 deletions

30
C++/lesson7/task1.cpp Normal file
View File

@ -0,0 +1,30 @@
#include <iostream>
#include <string>
struct Good {
std::string name;
unsigned cost;
unsigned amount;
Good(std::string name, unsigned cost, unsigned amount) {
this->name = name;
this->cost = cost;
this->amount = amount;
}
void information() {
std::cout << '(' << name << ',' << cost << ',' << amount
<< ")\n";
}
void changeCost(unsigned cost) {
this->cost = cost;
}
};
int main() {
Good apple("Apple", 10, 20);
apple.information();
apple.changeCost(20);
apple.information();
}