1. Си / Говнокод #27199

    −3

    1. 001
    2. 002
    3. 003
    4. 004
    5. 005
    6. 006
    7. 007
    8. 008
    9. 009
    10. 010
    11. 011
    12. 012
    13. 013
    14. 014
    15. 015
    16. 016
    17. 017
    18. 018
    19. 019
    20. 020
    21. 021
    22. 022
    23. 023
    24. 024
    25. 025
    26. 026
    27. 027
    28. 028
    29. 029
    30. 030
    31. 031
    32. 032
    33. 033
    34. 034
    35. 035
    36. 036
    37. 037
    38. 038
    39. 039
    40. 040
    41. 041
    42. 042
    43. 043
    44. 044
    45. 045
    46. 046
    47. 047
    48. 048
    49. 049
    50. 050
    51. 051
    52. 052
    53. 053
    54. 054
    55. 055
    56. 056
    57. 057
    58. 058
    59. 059
    60. 060
    61. 061
    62. 062
    63. 063
    64. 064
    65. 065
    66. 066
    67. 067
    68. 068
    69. 069
    70. 070
    71. 071
    72. 072
    73. 073
    74. 074
    75. 075
    76. 076
    77. 077
    78. 078
    79. 079
    80. 080
    81. 081
    82. 082
    83. 083
    84. 084
    85. 085
    86. 086
    87. 087
    88. 088
    89. 089
    90. 090
    91. 091
    92. 092
    93. 093
    94. 094
    95. 095
    96. 096
    97. 097
    98. 098
    99. 099
    100. 100
    int hlp_fix(char data[]  , char dump_alpha[] ){
    int run = 0;
    char prev = '0';
    int count_bracket = 0 ;
    puts(dump_alpha);
    	
    if(my_isdigit(data[0]) || my_isalpha(data[0])    ){
    					 prev = data[0];
    					}
    	else if (data[0] == '('){
    			count_bracket++;
    			 prev = data[0];
    	}
     			else{
    				  
    					puts("!!!  first error  !!!");
    				  	exit(1);
    				  }
    
    for(run = 1;data[run] != '\0' ;run++){
    	
    	
    	if ( data[run + 1]    == '\0'  &&  isOperator(prev )           ){
    					
    					puts("!!! error  isOperator  !!!");
    				  	exit(1);
    			}
    
    	
    	if(isgraph(data[run] )){
    		
    		if( secure_1(data[run], dump_alpha )  ) { 
    		  printf("!!! error  this no list = %c !!!",  data[run] );
    			exit(1);
    		}
    		
    		if(prev == '.' ){
    			
    			if( data[run  - 1 ]   == '.' && my_isdigit(data[run])      )   {
    						 prev = data[run];
    				}
    		
    		 else{
    				  	
    					puts(" !!! error point !!!");
    				  	exit(1);
    				  }
    			}
    		
    			else	if(my_isdigit(prev)  ){
    				
    			
    			if(  data[run] == ')' )   {
    					 	 prev = data[run];
    					 	--count_bracket;
    					 }
    				
    			else	if(	 (	my_isdigit(data[ run - 1  ])       	||	data[run - 1 ] == '.' || 
    					
    					isOperator(data[run]) )    ){
    					 prev = data[run];
    					
    			}
    					 
    			else{
    				  puts("error  isdigit");
    				  	exit(1);
    				  }
    				}
    		
    			else	if(isOperator(prev)){
    			
    				if( (my_isdigit(data[run])  || my_isalpha(data[run] )       )   ){
    						 prev = data[run];
    				}
    					else if ( data[run] == '('  ){
    							 prev = data[run];
    							 count_bracket++;
    					}
    					
    			else{
    				  	
    					puts("error  isOperator");
    				  	exit(1);
    				  }
    				}
    			
    			else	if(prev == '(' ){
    			
    				if( (my_isdigit(data[run] )  || my_isalpha(data[run] )  ) ){
    					 prev = data[run];
    				
    				}
    				else if ( data[run] == '('){
    					 count_bracket++;
    					 prev = data[run];
    				}
    				
    				
    				else{

    Ни что так не вдохновляет на бейсджампинг без парашюта как "отлов ошибок" который не работает ))))
    https://ideone.com/rjrwMQ

    Oh-my-God-my-leg, 07 Января 2021

    Комментарии (2)
  2. Java / Говнокод #27197

    −2

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    This would raise the true nightmare. A type variable is a different beast than the actual type of a concrete instance. 
    A type variable could resolve to a, e.g. ? extends Comparator<? super Number> to name one (rather simple) example. 
    Providing the necessary meta information would imply that not only object allocation becomes much more expensive, 
    every single method invocation could impose these additional cost, to an even bigger extend as we are now not only 
    talking about the combination of generic classes with actual classes, but also every possible wildcarded combination, 
    even of nested generic types.

    https://stackoverflow.com/a/38060012

    Джавист-долбоеб с пеной у рта защищает type erasure, задавая вопросы "Does it [c#] have an equivalent of Function.identity()? " в комментариях и собирая плюсы таких же поехавших.
    В качестве аргументов он предлагает:

    1) сложна
    2) хранить информацию о типах в рантайме означает что в рантайме придется хранить информацию о типах!!!
    3) [s]ма-те-ма-ти-ка[/x] реф-лек-си-я

    Причем ведь наверняка знает и про темплейты в крестах, и про то что шарп такой хуйней не страдает.

    Fike, 05 Января 2021

    Комментарии (10)
  3. C++ / Говнокод #27193

    0

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    #include <string>
    #include <iostream>
     
    int main() {
        std::string kakoi("Какой багор )))", 5);
        std::string bagor((std::string)"Какой багор )))" , 5);
        std::cout << kakoi << bagor << std::endl; 
    }

    Наверняка было, но ладно.

    https://ideone.com/syFnI2

    3_dar, 04 Января 2021

    Комментарии (16)
  4. Python / Говнокод #27192

    +1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    board = [" ", " ", " "], \
            [" ", " ", " "], \
            [" ", " ", " "]
    
    i = 1
    win = True
    place_chek = True
    
    
    def show():
        print("---------")
        print("|" + board[0][0] + "  " + board[0][1] + "  " + board[0][2] + "|")
        print("|" + board[1][0] + "  " + board[1][1] + "  " + board[1][2] + "|")
        print("|" + board[2][0] + "  " + board[2][1] + "  " + board[2][2] + "|")
        print("---------")
    
    
    def move(i):
        if i % 2 == 0:
            return "X"
        else:
            return "0"
    
    
    def choise(x, y):
        board[x][y] = move(i)
    
    
    def repeat(x, y):
        global i
        global place_chek
        if board[x][y] == "0":
            print()
            print("Choose another location")
            print()
            place_chek = False
    
        elif board[x][y] == "X":
            print()
            print("Choose another location")
            print()
            place_chek = False
    
        elif board[x][y] == " ":
            i = i + 1
            place_chek = True
    
    
    def win_check():
        global win
        if board[0][0] == board[0][1] == board[0][2] == "X" or \
                board[1][0] == board[1][1] == board[1][2] == "X" or \
                board[2][0] == board[2][1] == board[2][2] == "X" or \
                board[0][0] == board[1][0] == board[2][0] == "X" or \
                board[0][1] == board[1][1] == board[2][1] == "X" or \
                board[0][2] == board[1][2] == board[2][2] == "X" or \
                board[0][0] == board[1][1] == board[2][2] == "X" or \
                board[0][2] == board[1][1] == board[2][0] == "X":
            print("X won")
            win = False
    
        elif board[0][0] == board[0][1] == board[0][2] == "0" or \
                board[1][0] == board[1][1] == board[1][2] == "0" or \
                board[2][0] == board[2][1] == board[2][2] == "0" or \
                board[0][0] == board[1][0] == board[2][0] == "0" or \
                board[0][1] == board[1][1] == board[2][1] == "0" or \
                board[0][2] == board[1][2] == board[2][2] == "0" or \
                board[0][0] == board[1][1] == board[2][2] == "0" or \
                board[0][2] == board[1][1] == board[2][0] == "0":
            print("0 won")
            win = False
    
    
    show()  # first time show
    
    while win:
        x, y = input("Enter the coordinates: ").split()
        repeat(int(x) - 1, int(y) - 1)
        if place_chek:
            choise(int(x) - 1, int(y) - 1)
        show()
        win_check()

    Крестики нолики на питоне. Самый большой позор это способ определение победы, не смог ничего придумать и сделал такой позор

    warzon131, 03 Января 2021

    Комментарии (63)
  5. Си / Говнокод #27191

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    void s_sort(int *a, size_t sz)
    {
      if ((sz == 0) || (sz == 1))
      {
        return;
      }
      if (sz  == 2)
      {
        int a_max = a[0] > a[1] ? a[0] : a[1];
        int a_min = a[0] > a[1] ? a[1] : a[0];
        a[0] = a_min;
        a[1] = a_max;
        return;
      }
      s_sort(a, sz - 1);
      s_sort(a + 1, sz - 1);
      s_sort(a, sz - 1);
    }

    Крайне тупая по своей сути рекурсивная сортировка. Есть ли у нее название?

    Вряд ли она имеет какое-то практическое применение именно как сортировка, но зато можно ее переписать на какой-нибудь Coq и об нее доказывать другие сортировки. Типа если какая-то там другая сортировка на всех возможных входных массивах выдает то же, что и выдает вот эта сортировка, то сортировка правильная.

    j123123, 03 Января 2021

    Комментарии (19)
  6. VisualBasic / Говнокод #27189

    −2

    1. 1
    We’ve heard your feedback that you want Visual Basic on .NET Core

    https://devblogs.microsoft.com/vbteam/visual-basic-support-planned-for-net-5-0/

    MAKAKA, 31 Декабря 2020

    Комментарии (15)
  7. Куча / Говнокод #27188

    +3

    1. 1
    Новогодний оффтоп #1

    Перекатить через год.

    gostinho, 31 Декабря 2020

    Комментарии (493)
  8. C++ / Говнокод #27187

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    89. 89
    90. 90
    91. 91
    92. 92
    93. 93
    94. 94
    95. 95
    96. 96
    97. 97
    98. 98
    99. 99
    #include <iostream>
    using namespace std;
    const char _Arr_Digit [] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'},
        _Arr_Mantissa [] = {'e', 'E'},
        _Arr_Sign [] = {'-', '+'},
        _Arr_Dot[] = {'.'},
        _Arr_Combo[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.'};
    const bool DIGIT = false, SIGN = false, OTHER = true;  
    bool _Call_Mantissa = false,  _flag_dot = false, _flag_mant = false;
    int _position_mant;
    bool Parse_symbol (char _symb, const char* _Arr, int _size_arr);
    bool Parse_full_string (string _checking, int _offset, int _amount, bool _sec_cond, const char* _Arr, int _size_arr, bool _Drive);   
    bool Parse_the_first_symbol (string _checking);
    bool Parse_the_second_symbol (string _checking);
    bool Control_result (int i, string _checking);
    bool Parse_mantissa (string _checking);
    bool Parse_full_string_before_mantissa (int i, string _checking);
    bool Parse_the_first_symbol_after_mantissa (string _checking);
    bool Parse_full_string_after_mantissa (string _checking);
    long double Questioning (char s);
    long double Questioning (char s) {
        string _checking;
        while (true) {  
            cout << "Введите значение " << s << ": ";
            getline(cin, _checking);  
            if (_checking.length() == 0) 
                cout << "Вы не ввели значение!" << endl;   
            else if (!Parse_the_first_symbol(_checking)) 
                cout << "Некорректное значение!" << endl;  
            else return strtold(_checking.c_str(), nullptr); }}
    bool Parse_symbol (char _symb, const char* _Arr, int _size_arr) {
        for (int i = 0; i <= _size_arr; i++)  
            if (_symb == _Arr[i]) return true;
        return false; }
    bool Parse_full_string (string _checking, int _offset, int _amount, bool _sec_cond, const char* _Arr, int _size_arr, bool _Drive) {  
        bool _parse_flag;
        int _parse_count = 0;
        for (int j = _offset; j < _amount; j++) {
            if (Parse_symbol(_checking[j], _Arr, _size_arr)) {
                _parse_count++;
                if (_sec_cond) return false;
                if (_Drive) {
                    if (_Call_Mantissa)
                        _sec_cond = (j == (_amount-1));
                    if (_parse_flag) return false;
                    _parse_flag = true;
                    if (_Call_Mantissa) {
                        _flag_mant = _parse_flag;
                        _position_mant = j; 
                    }
                }
            }
        }
       if (!_Drive) { 
           if ((_amount - _offset) == _parse_count) return true;
           else return false; 
        }
       else return true; 
    }
    bool Parse_the_first_symbol (string _checking) {
      int LENGTH = _checking.length();
      bool _parse_cond = (LENGTH < 2);
      if (Parse_full_string (_checking, 0, 1, _parse_cond, _Arr_Sign, 1, SIGN)) 
          return Parse_the_second_symbol (_checking);
      else if (Parse_full_string (_checking, 0, 1, false, _Arr_Digit, 9, DIGIT))
          return Control_result (0, _checking);
      else return false; }
    bool Parse_the_second_symbol (string _checking) {
        if (Parse_full_string (_checking, 1, 2, false, _Arr_Digit, 9, DIGIT)) 
            return Control_result (1, _checking);
        else return false; }
    bool Control_result (int i, string _checking) {    
        if (!Parse_mantissa (_checking)) return false;    
        else if (_flag_mant) {
            string _before_mantissa = _checking.substr(0, _position_mant);
            string _after_mantissa = _checking.substr(_position_mant + 1);
            return (Parse_full_string_before_mantissa (i, _before_mantissa)
                    && Parse_the_first_symbol_after_mantissa (_after_mantissa)); } 
        else return Parse_full_string_before_mantissa (i, _checking); }
    bool Parse_mantissa (string _checking) {
        int LENGTH = _checking.length();
        _Call_Mantissa = true;   
        bool cash = Parse_full_string (_checking, 0, LENGTH, false, _Arr_Mantissa, 1, OTHER);
        _Call_Mantissa = false;
        return cash; }
    bool Parse_full_string_before_mantissa (int i, string _checking) { // but the first symbol  
        int LENGTH = _checking.length();
        return Parse_full_string (_checking, i, LENGTH, false, _Arr_Dot, 0, OTHER) &&
            Parse_full_string (_checking, i, LENGTH, false, _Arr_Combo, 10, DIGIT); }
    bool Parse_the_first_symbol_after_mantissa (string _checking) {
        int LENGTH = _checking.length();
        bool _parse_cond = (LENGTH < 2);
        if ((Parse_full_string (_checking, 0, 1, _parse_cond, _Arr_Sign, 1, SIGN)) ||
            (Parse_full_string (_checking, 0, 1, false, _Arr_Digit, 9, DIGIT)))
            return Parse_full_string_after_mantissa (_checking);
        else return false; }
    bool Parse_full_string_after_mantissa (string _checking) {
        int LENGTH = _checking.length();
        return Parse_full_string (_checking, 1, LENGTH, false, _Arr_Digit, 9, DIGIT); }

    Очередная говнопопытка оптимизации алгоритма.

    Westnik_Govnokoda, 30 Декабря 2020

    Комментарии (146)
  9. Си / Говнокод #27185

    +2

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    chek_LD(void)
    {
    	LOCK_DETECT = read();
    	if (LOCK_DETECT == SAVE_LOCK_DETECT)
    	{
    		return;
    	}
    	if (LOCK_DETECT == 0)
    	{
    		LOCK_DETECT = read();
    		if (LOCK_DETECT == 0)
    		{
    			if (LOCK_DETECT != SAVE_LOCK_DETECT)
    			{
    				SAVE_LOCK_DETECT = 0;
    			}
    		}
    	}
    	else
    	{
    		delay_us(5);
    		LOCK_DETECT = read();
    		if (LOCK_DETECT == 1)
    		{
    			if (LOCK_DETECT != SAVE_LOCK_DETECT)
    			{
    				SAVE_LOCK_DETECT = 1;
    			}
    		}
    	}
    	return;
    }

    пришел на легаси проект. обожаю глобальные переменные на весь проект. еще больше обожаю логику)

    viteo, 29 Декабря 2020

    Комментарии (19)
  10. C++ / Говнокод #27183

    0

    1. 001
    2. 002
    3. 003
    4. 004
    5. 005
    6. 006
    7. 007
    8. 008
    9. 009
    10. 010
    11. 011
    12. 012
    13. 013
    14. 014
    15. 015
    16. 016
    17. 017
    18. 018
    19. 019
    20. 020
    21. 021
    22. 022
    23. 023
    24. 024
    25. 025
    26. 026
    27. 027
    28. 028
    29. 029
    30. 030
    31. 031
    32. 032
    33. 033
    34. 034
    35. 035
    36. 036
    37. 037
    38. 038
    39. 039
    40. 040
    41. 041
    42. 042
    43. 043
    44. 044
    45. 045
    46. 046
    47. 047
    48. 048
    49. 049
    50. 050
    51. 051
    52. 052
    53. 053
    54. 054
    55. 055
    56. 056
    57. 057
    58. 058
    59. 059
    60. 060
    61. 061
    62. 062
    63. 063
    64. 064
    65. 065
    66. 066
    67. 067
    68. 068
    69. 069
    70. 070
    71. 071
    72. 072
    73. 073
    74. 074
    75. 075
    76. 076
    77. 077
    78. 078
    79. 079
    80. 080
    81. 081
    82. 082
    83. 083
    84. 084
    85. 085
    86. 086
    87. 087
    88. 088
    89. 089
    90. 090
    91. 091
    92. 092
    93. 093
    94. 094
    95. 095
    96. 096
    97. 097
    98. 098
    99. 099
    100. 100
    #include <iostream>
    #include <cmath>
    #include <iomanip>
    #include "govno.h"
    using namespace std;
    void prnt_msg_start() {
        cout << endl << "Программа решения квадратного уравнения по формуле: ";
        cout << "aX^2 + bX + c = 0" << endl;
        cout << setprecision(69) << endl; }
    long double ks[] = {1, 2, 1, 3, 10, 2};
    class SqrtQual {
        const string msg_not_roots = "Нет корней!\n",
            msg_any_number = "X -- любое число.\n",
            msg_special_event = "Решение частного случая (bX + c = 0):\n",
            msg_discrim = "Дискриминант = ";
        long double A, B, C, D, X1, X2;
        bool flag_roots = true, flag_equal_zero, flag_special_event, flag_not_equal_zero,
            flag_any_number, flag_input = true, flag_abs_roots, flag_cubes_roots;
        void init_fields();
        string answer();
        bool to_decide();
        void to_start();
        public:
        SqrtQual ();
        SqrtQual (int z);
        SqrtQual (long double a, long double b, long double c);
    };
    void variation_task(int variant) {
        if (!variant) SqrtQual obj; 
        else {
            for (int i = 0, j = 0; i < 2; i++, j += 3) { 
                if (variant < 2) SqrtQual obj(ks[j], ks[j+1], ks[j+2]); 
                else SqrtQual obj(i);
            }
        }
    }
    int main() {
        prnt_msg_start();
        for (int i = 1; i < 3; i++) variation_task(i);
    }
    SqrtQual::SqrtQual(int z) {
        if (z) flag_abs_roots = true;
        else flag_cubes_roots = true; 
        to_start(); }
    SqrtQual::SqrtQual() {
        to_start(); }
    SqrtQual::SqrtQual(long double a, long double b, long double c) {
        A = a;
        B = b;
        C = c;
        flag_input = false;
        to_start(); }
    void SqrtQual::to_start() {
        cout << endl;
        if (flag_input) Govnokod l_obj(A, B, C);
        init_fields();
        cout << answer(); }
    void SqrtQual::init_fields() {
        flag_any_number = ((A == 0) && (B == 0) && (C == 0));
        flag_not_equal_zero = ((A == 0) && (B == 0) && (C != 0));
        flag_special_event = ((A == 0) && (B != 0) && (C != 0));
        bool equal_zero_v1 = ((A == 0) && (B != 0) && (C == 0));
        bool equal_zero_v2 = ((A != 0) && (B == 0) && (C == 0));
        flag_equal_zero = equal_zero_v1 || equal_zero_v2;
        D = B*B - 4*A*C;
        if ((D < 0) || flag_not_equal_zero) 
            flag_roots = false; }
    string SqrtQual::answer() {
        string tmp = msg_discrim + to_string(D) + "\n";
        if (flag_special_event)
            tmp = msg_special_event + tmp; 
        if (flag_any_number)
            return msg_any_number;
        else if (not flag_roots)
            return msg_not_roots;
        else {
            bool flag_args = to_decide();
            string root1("X = "), root2("X2 = ");
            if (flag_abs_roots) {
                root1 = "| X | = ", root2 = "| X2 | = ";
                X1 = abs(X1), X2 = abs(X2);
            }
            else if (flag_cubes_roots) {
                root1 = "X ^3 = ", root2 = "X2 ^3 = ";
                X1 = pow(X1, 3), X2 = pow(X2, 3);
            }    
            tmp += root1 + to_string(X1) + "\n";
            if (flag_args) 
                tmp += root2 + to_string(X2) + "\n";
        }  
        return tmp;
    }
    bool SqrtQual::to_decide() /* if true then two roots else one root */ {  
        if (flag_equal_zero) X1 = 0;
        else if (flag_special_event) X1 = (-C/B); // special event
        else if (D == 0) X1 = (-B/2*A);
        else {
            X1 = ((-B + sqrt(D)) / 2*A), X2 = ((-B - sqrt(D)) / 2*A);
            return true; }
        return false; }

    Немного расширил функционал говнокода с учётом замечаний (в том числе и по архитектуре).

    Westnik_Govnokoda, 27 Декабря 2020

    Комментарии (27)