This repository has been archived on 2023-05-13. You can view files and clone it, but cannot push or open issues or pull requests.
mipt_cpp/term1/seminar01_overload/06_is_expensive/is_expensive.cpp
2023-02-25 19:34:24 +03:00

20 lines
338 B
C++

#include <iostream>
using std::cout, std::endl;
struct Book {
char title[100];
int pages;
float price;
};
bool isExpensive(const Book& b) {
if (b.price > 1000) {
return true;
}
return false;
}
int main() {
Book b = {"One Hundred Years of Solitude", 456, 1200};
cout << isExpensive(b) << endl;
}