Skip to main content
Formatting
Source Link
200_success
  • 145.7k
  • 22
  • 191
  • 481
  • Function 'similarValues()'similarValues() should be a boolbool instead of a doubledouble and return truetrue or falsefalse

  • You could probably combine your other two functions into one that returns different things for larger the same or smaller instead of returning the larger type or again use a bool to determine whether a value is larger and return truetrue or falsefalse.

  • Consider using switch statements instead of if statements for more readable code.

     cout << "The smaller value is: " << valueSmaller(value01, value02) << " ,     the larger value is: " << valueLarger(value01, value02) << "\n";
    
  • Instead of using << "\n"<< "\n" consider using '<< endl;'<< endl

  • Other than that your code is reasonably readable, try and keep your comments concise and to the point and make sure you only use doubles when you need to.

  • You are probably not overdoing functions although some of them could be combined as I have already said.

  • Consider using 'using std::cout;'using std::cout instead of 'using namespace std'using namespace std or avoid it all together.

  • Function 'similarValues()' should be a bool instead of a double and return true or false

  • You could probably combine your other two functions into one that returns different things for larger the same or smaller instead of returning the larger type or again use a bool to determine whether a value is larger and return true or false.

  • Consider using switch statements instead of if statements for more readable code.

     cout << "The smaller value is: " << valueSmaller(value01, value02) << " ,     the larger value is: " << valueLarger(value01, value02) << "\n";
    
  • Instead of using << "\n" consider using '<< endl;'

  • Other than that your code is reasonably readable, try and keep your comments concise and to the point and make sure you only use doubles when you need to.

  • You are probably not overdoing functions although some of them could be combined as I have already said.

  • Consider using 'using std::cout;' instead of 'using namespace std' or avoid it all together.

  • Function similarValues() should be a bool instead of a double and return true or false

  • You could probably combine your other two functions into one that returns different things for larger the same or smaller instead of returning the larger type or again use a bool to determine whether a value is larger and return true or false.

  • Consider using switch statements instead of if statements for more readable code.

     cout << "The smaller value is: " << valueSmaller(value01, value02) << " ,     the larger value is: " << valueLarger(value01, value02) << "\n";
    
  • Instead of using << "\n" consider using << endl

  • Other than that your code is reasonably readable, try and keep your comments concise and to the point and make sure you only use doubles when you need to.

  • You are probably not overdoing functions although some of them could be combined as I have already said.

  • Consider using using std::cout instead of using namespace std or avoid it all together.

added 97 characters in body
Source Link
exitcode
  • 155
  • 1
  • 1
  • 8
  • Function 'similarValues()' should be a bool instead of a double and return true or false

  • You could probably combine your other two functions into one that returns different things for larger the same or smaller instead of returning the larger type or again use a bool to determine whether a value is larger and return true or false.

  • Consider using switch statements instead of if statements for more readable code.

     cout << "The smaller value is: " << valueSmaller(value01, value02) << " ,     the larger value is: " << valueLarger(value01, value02) << "\n";
    
  • Instead of using << "\n" consider using '<< endl;'

  • Other than that your code is reasonably readable, try and keep your comments concise and to the point and make sure you only use doubles when you need to.

  • You are probably not overdoing functions although some of them could be combined as I have already said.

  • Consider using 'using std::cout;' instead of 'using namespace std' or avoid it all together.

  • Function 'similarValues()' should be a bool instead of a double and return true or false

  • You could probably combine your other two functions into one that returns different things for larger the same or smaller instead of returning the larger type or again use a bool to determine whether a value is larger and return true or false.

  • Consider using switch statements instead of if statements for more readable code.

     cout << "The smaller value is: " << valueSmaller(value01, value02) << " ,     the larger value is: " << valueLarger(value01, value02) << "\n";
    
  • Instead of using << "\n" consider using '<< endl;'

  • Other than that your code is reasonably readable, try and keep your comments concise and to the point and make sure you only use doubles when you need to.

  • You are probably not overdoing functions although some of them could be combined as I have already said.

  • Function 'similarValues()' should be a bool instead of a double and return true or false

  • You could probably combine your other two functions into one that returns different things for larger the same or smaller instead of returning the larger type or again use a bool to determine whether a value is larger and return true or false.

  • Consider using switch statements instead of if statements for more readable code.

     cout << "The smaller value is: " << valueSmaller(value01, value02) << " ,     the larger value is: " << valueLarger(value01, value02) << "\n";
    
  • Instead of using << "\n" consider using '<< endl;'

  • Other than that your code is reasonably readable, try and keep your comments concise and to the point and make sure you only use doubles when you need to.

  • You are probably not overdoing functions although some of them could be combined as I have already said.

  • Consider using 'using std::cout;' instead of 'using namespace std' or avoid it all together.

Source Link
exitcode
  • 155
  • 1
  • 1
  • 8

  • Function 'similarValues()' should be a bool instead of a double and return true or false

  • You could probably combine your other two functions into one that returns different things for larger the same or smaller instead of returning the larger type or again use a bool to determine whether a value is larger and return true or false.

  • Consider using switch statements instead of if statements for more readable code.

     cout << "The smaller value is: " << valueSmaller(value01, value02) << " ,     the larger value is: " << valueLarger(value01, value02) << "\n";
    
  • Instead of using << "\n" consider using '<< endl;'

  • Other than that your code is reasonably readable, try and keep your comments concise and to the point and make sure you only use doubles when you need to.

  • You are probably not overdoing functions although some of them could be combined as I have already said.