|
@ -2,21 +2,21 @@ |
|
|
#include "outputHandling.h" |
|
|
#include "outputHandling.h" |
|
|
#include "inputHandling.h" |
|
|
#include "inputHandling.h" |
|
|
|
|
|
|
|
|
void buildHexString(char* string, int number) { |
|
|
|
|
|
sprintf(string, "%X", number); |
|
|
|
|
|
|
|
|
void buildHexString(char* string, int num) { |
|
|
|
|
|
sprintf(string, "%X", num); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void buildOctString(char* string, int number) { |
|
|
|
|
|
sprintf(string, "%o", number); |
|
|
|
|
|
|
|
|
void buildOctString(char* string, int num) { |
|
|
|
|
|
sprintf(string, "%o", num); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void showResult(calc_op* result) { |
|
|
|
|
|
|
|
|
void showResult(calc_op* res) { |
|
|
char string[60] = {0}; |
|
|
char string[60] = {0}; |
|
|
printf("Das Ergebnis ist: %f\n", result->result); |
|
|
|
|
|
printf("Das Ergebnis in dec: %i\n",(int)result->result); |
|
|
|
|
|
buildHexString(string, (int) result->result); |
|
|
|
|
|
|
|
|
printf("Das Ergebnis ist: %f\n", res->result); |
|
|
|
|
|
printf("Das Ergebnis in dec: %i\n",(int)res->result); |
|
|
|
|
|
buildHexString(string, (int) res->result); |
|
|
printf("Das Ergebnis in buildHexString: 0x%s\n", string); ; |
|
|
printf("Das Ergebnis in buildHexString: 0x%s\n", string); ; |
|
|
buildOctString(string, (int) result->result); |
|
|
|
|
|
|
|
|
buildOctString(string, (int) res->result); |
|
|
printf("Das Ergebnis in buildOctString: %s\n", string); ; |
|
|
printf("Das Ergebnis in buildOctString: %s\n", string); ; |
|
|
} |
|
|
} |