Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class ladle_sample{
- float Al, B, Bi, Co, Cr, Cu, La, Mn, Mo;
- public:
- void set(float al, float b, float bi, float co, float cr, float cu, float la, float mn, float mo){
- Al = al;
- B = b;
- Bi = bi;
- Co = co;
- Cr = cr;
- Cu = cu;
- La = la;
- Mn = mn;
- Mo = mo;
- }
- void limit(){
- if(Al <= 0.3){
- cout << "Проходит по ГОСТу." << endl;
- }
- if(B <= 0.0008){
- cout << "Проходит по ГОСТу." << endl;
- }
- if(Bi <= 0.1){
- cout << "Проходит по ГОСТу." << endl;
- }
- if(Co <= 0.3){
- cout << "Проходит по ГОСТу." << endl;
- }
- if(Cr <= 0.3){
- cout << "Проходит по ГОСТу." << endl;
- }
- if(Cu <= 0.4){
- cout << "Проходит по ГОСТу." << endl;
- }
- if(La <= 0.1){
- cout << "Проходит по ГОСТу." << endl;
- }
- if(Mn <= 1.65){
- cout << "Проходит по ГОСТу." << endl;
- }
- if(Mo <= 0.08){
- cout << "Проходит по ГОСТу." << endl;
- }
- }
- void get(){
- Al+=0.1;
- B+=0.0001;
- Bi+=0.01;
- Co+=0.01;
- Cr+=0.01;
- Cu+=0.01;
- La+=0.01;
- Mn+=0.01;
- Mo+=0.01;
- cout << Al << " " << B << " " << Bi << " " << Co << " " << Cr << " " << Cu;
- cout << " " << La << " " << Mn << " " << Mo << endl;
- }
- };
- class _abrasion{
- float abrasion, abrasive, abrasive_belt, abrasive_blasting, abrasive_disk;
- public:
- void set1(float ab, float abr, float bel, float blast, float disk){
- abrasion = ab;
- abrasive = abr;
- abrasive_belt = bel;
- abrasive_blasting = blast;
- abrasive_disk = disk;
- }
- void get(){
- abrasion += 1;
- abrasive += 1;
- abrasive_belt += 1;
- abrasive_blasting += 1;
- abrasive_disk += 1;
- cout << abrasion << " " << abrasive << " " << abrasive_belt << " ";
- cout << abrasive_blasting << " " << abrasive_disk << endl;
- }
- void class_0(){
- if(abrasion <= 2){
- cout << "По ГОСТу." << endl;
- }
- if(abrasive <= 2){
- cout << "По ГОСТу." << endl;
- }
- if(abrasive_belt <= 2){
- cout << "По ГОСТу." << endl;
- }
- if(abrasive_blasting <= 2){
- cout << "По ГОСТу." << endl;
- }
- if(abrasive_disk <= 2){
- cout << "По ГОСТу." << endl;
- }
- }
- };
- int main() {
- ladle_sample ls;
- ls.set(0.2,0.0007,0.09,0.29,0.29,0.39,0.09,1.64,0.07);
- ls.limit();
- _abrasion a;
- a.set1(1,1,1,1,1);
- a.get();
- a.class_0();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement