You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
807 B

  1. #include "calculatorGetUserInput.h"
  2. // Note:
  3. /* This Function may or may not be implemented in actual program, even if it is merged to the main branch.
  4. If it is temporarily not included in the main Program, then this has a role in future Development of the Project */
  5. int allowOnly() //int allowOnly() is helpful for indirectly testing void calculatorGetUserInput().
  6. {
  7. const int a = 1;
  8. if(a == 1) //Just a random constant which has a role in testing
  9. {
  10. return 1;
  11. }
  12. }
  13. void calculatorGetUserInput(float *num1, float *num2)
  14. {
  15. if (allowOnly() == 1) //only if int allowOnly() returns 1, void calculatorGetUserInput will display the desired output.
  16. {
  17. printf("number1: ");
  18. scanf("%f", num1);
  19. printf("number2: ");
  20. scanf("%f", num2);
  21. }
  22. }