Advertisement
evcamels

lr-2-19

Nov 17th, 2020
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.95 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. class ladle_sample{
  4. float Al, B, Bi, Co, Cr, Cu, La, Mn, Mo;
  5. public:
  6. void set(float al, float b, float bi, float co, float cr, float cu, float la, float mn, float mo){
  7. Al = al;
  8. B = b;
  9. Bi = bi;
  10. Co = co;
  11. Cr = cr;
  12. Cu = cu;
  13. La = la;
  14. Mn = mn;
  15. Mo = mo;
  16. }
  17. void limit(){
  18. if(Al <= 0.3){
  19. cout << "Проходит по ГОСТу." << endl;
  20. }
  21. if(B <= 0.0008){
  22. cout << "Проходит по ГОСТу." << endl;
  23. }
  24. if(Bi <= 0.1){
  25. cout << "Проходит по ГОСТу." << endl;
  26. }
  27. if(Co <= 0.3){
  28. cout << "Проходит по ГОСТу." << endl;
  29. }
  30. if(Cr <= 0.3){
  31. cout << "Проходит по ГОСТу." << endl;
  32. }
  33. if(Cu <= 0.4){
  34. cout << "Проходит по ГОСТу." << endl;
  35. }
  36. if(La <= 0.1){
  37. cout << "Проходит по ГОСТу." << endl;
  38. }
  39. if(Mn <= 1.65){
  40. cout << "Проходит по ГОСТу." << endl;
  41. }
  42. if(Mo <= 0.08){
  43. cout << "Проходит по ГОСТу." << endl;
  44. }
  45. }
  46. void get(){
  47. Al+=0.1;
  48. B+=0.0001;
  49. Bi+=0.01;
  50. Co+=0.01;
  51. Cr+=0.01;
  52. Cu+=0.01;
  53. La+=0.01;
  54. Mn+=0.01;
  55. Mo+=0.01;
  56. cout << Al << " " << B << " " << Bi << " " << Co << " " << Cr << " " << Cu;
  57. cout << " " << La << " " << Mn << " " << Mo << endl;
  58. }
  59. };
  60. class _abrasion{
  61. float abrasion, abrasive, abrasive_belt, abrasive_blasting, abrasive_disk;
  62. public:
  63. void set1(float ab, float abr, float bel, float blast, float disk){
  64. abrasion = ab;
  65. abrasive = abr;
  66. abrasive_belt = bel;
  67. abrasive_blasting = blast;
  68. abrasive_disk = disk;
  69. }
  70. void get(){
  71. abrasion += 1;
  72. abrasive += 1;
  73. abrasive_belt += 1;
  74. abrasive_blasting += 1;
  75. abrasive_disk += 1;
  76. cout << abrasion << " " << abrasive << " " << abrasive_belt << " ";
  77. cout << abrasive_blasting << " " << abrasive_disk << endl;
  78. }
  79. void class_0(){
  80. if(abrasion <= 2){
  81. cout << "По ГОСТу." << endl;
  82. }
  83. if(abrasive <= 2){
  84. cout << "По ГОСТу." << endl;
  85. }
  86. if(abrasive_belt <= 2){
  87. cout << "По ГОСТу." << endl;
  88. }
  89. if(abrasive_blasting <= 2){
  90. cout << "По ГОСТу." << endl;
  91. }
  92. if(abrasive_disk <= 2){
  93. cout << "По ГОСТу." << endl;
  94. }
  95. }
  96. };
  97. int main() {
  98. ladle_sample ls;
  99. ls.set(0.2,0.0007,0.09,0.29,0.29,0.39,0.09,1.64,0.07);
  100. ls.limit();
  101.  
  102. _abrasion a;
  103. a.set1(1,1,1,1,1);
  104. a.get();
  105. a.class_0();
  106. return 0;
  107. }
  108.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement