|
@ -2,7 +2,14 @@ |
|
|
#include "outputHandling.h" |
|
|
#include "outputHandling.h" |
|
|
#include "inputHandling.h" |
|
|
#include "inputHandling.h" |
|
|
|
|
|
|
|
|
|
|
|
void hex(char* string, int number) { |
|
|
|
|
|
sprintf(string, "%X", number); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void printResult(calc_op* result) { |
|
|
void printResult(calc_op* result) { |
|
|
printf("Das Ergebnis ist: %f", result->result); |
|
|
|
|
|
|
|
|
char buf[60] = {0}; |
|
|
|
|
|
printf("Das Ergebnis ist: %f\n", result->result); |
|
|
|
|
|
printf("Das Ergebnis in int: %i\n",(int)result->result); |
|
|
|
|
|
hex(buf, (int)result->result); |
|
|
|
|
|
printf("Das Ergebnis in hex: 0x%s\n", buf); ; |
|
|
} |
|
|
} |