Browse Source

refactoring: added comments

remotes/origin/kgV
cxnnqr 11 months ago
parent
commit
edf2d87442
  1. 6
      src/kgV/main.c

6
src/kgV/main.c

@ -3,10 +3,16 @@
#include <stdio.h> #include <stdio.h>
int main(){ int main(){
// User input for the two numbers. No matter of positive or negative
printf("Please add the two numbers you want the kgV of:\n"); printf("Please add the two numbers you want the kgV of:\n");
int firstNum = usergetd("first number: ", NULL, NULL); int firstNum = usergetd("first number: ", NULL, NULL);
int secondNum = usergetd("second number: ", NULL, NULL); int secondNum = usergetd("second number: ", NULL, NULL);
// Calculation of the kgV
int result = kgV(firstNum, secondNum); int result = kgV(firstNum, secondNum);
// Print the result
printf("The kgV of %d and %d is: %d\n", firstNum, secondNum, result); printf("The kgV of %d and %d is: %d\n", firstNum, secondNum, result);
return 0; return 0;
Loading…
Cancel
Save