I am trying to make a program that simply divides the number given number and prints out the remainder and the solution of the given number divided by 10. However my code isnt printing out the correct values. Here is the following code:
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
uint64_t divide(uint64_t,uint64_t);
int main(int argc, char *argv[])
{
uint64_t num1 = 224262;
uint64_t num2 = 244212;
divide(num1,num2);
}
uint64_t divide( uint64_t set1, uint64_t set2 )
{
printf("%lX\n",set1);
uint64_t remainder = set1%10;
printf("%lX\n",remainder);
set1= set1/10;
printf("%lX\n",set1);
}
Currently the output of this gives me the following
36C06
2
579A
How would I have it so that it correctly outputs the divided value and the remainder?