Long lost father?
But yea it works Thanks a lot
Code:
int main()
{
signed int a;
signed int b;
scanf("%i \n %i",&a, &b);
unsigned long long c = 0;
c = c | (unsigned int)a;
printf("Deci%lld\n",c);
printf("Hex%llx\n\n",c);
c = c << 32;
printf("Deci%lld\n",c);
printf("Hex%llx\n\n",c);
c = c | (unsigned int)b;
printf("Deci%lld\n",c);
printf("Hex%llx\n\n",c);
printf("First number %d \nSecond number %d\n",a,b);
printf("%lld \n",c);
int (add_special_type) = (a+b);
{
printf("%lld\n",(long long)add_special_type);
}
}
Some of the printf I put just to see whats it doing so I can better understand it.
And the int add_special_type, that was also in the assignment so yea.
Thank you guys
Without the printf
Code:
int main()
{
signed int a;
signed int b;
scanf("%i \n %i",&a, &b);
unsigned long long c = 0;
c = c | (unsigned int)a;
c = c << 32;
c = c | (unsigned int)b;
printf("First number %d \nSecond number %d\n",a,b);
printf("%lld \n",c);
int (add_special_type) = (a+b);
{
printf("%lld\n",(long long)add_special_type);
}
}