how can i change the defined values of types on limits.h? i particuraly want to increace the value of unsgned long int if i can. thanks.
how can i change the defined values of types on limits.h? i particuraly want to increace the value of unsgned long int if i can. thanks.
>i particuraly want to increace the value of unsgned long int if i can
Why? I'm very sure that what you think you want isn't actually what you want. If you need a larger data type than an unsigned long int, use a long double and kill the decimal.
-Prelude
My best code is written with the delete key.
i want to know if it is possible.
Of course it is, simply change the limits.h values. But trust me when I say that this is not what you want.
-Prelude
My best code is written with the delete key.
i have done this already but it doesn't work. i wnt to print int value greater than unsigned long int.
Then you will have to get a 64bit system. a 32 bit int is always a 32 bit int no matter what the limit.h says.
Why do you need to print int values. Any reason double wont work?
i wiil try it. i use to print double or long double %u?
-PreludeCode:#include <stdio.h> #include <limits.h> int main ( void ) { double d = 1234567898765432.0; printf ( "%.0f\n%u", d, ULONG_MAX ); return 0; }
My best code is written with the delete key.
i made a programm that calculates prime numbers that are less from a number the user give. so i had an idea of giving him to put up to the number 10.000.000.000. but i had that problem. with a pentium 2 i have that would take a week to calculate the numbers.
> with a pentium 2 i have that would take a week to calculate the
> numbers.
Oh, here's an easy fix. Change your user input prompt to read:
"Enter two numbers, and come back in a week:" (for the humor impared, think "Take two of these and call me in the morning...")
Quzah.
Hope is the first step on the road to disappointment.
>so i had an idea of giving him to put up to the number 10.000.000.000.
Good idea, I find the need to know all of the primes between 9,000,000,000 and 10,000,000,000 on a daily basis.
-Prelude
My best code is written with the delete key.