Mail Archives: djgpp/1998/09/03/01:16:20
From: | grini AT rafael DOT co DOT il (Moshe Greenberg)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: LARGE numbers.
|
Date: | Thu, 03 Sep 1998 04:37:15 GMT
|
Organization: | NetVision LTD.
|
Lines: | 24
|
Message-ID: | <35ee1c0d.2961260@news.netvision.net.il>
|
References: | <1103_904198596 AT isaacc>
|
NNTP-Posting-Host: | raf2p30.rafael.co.il
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
On Thu, 27 Aug 1998 06:16:36 GMT, isaacc AT flash DOT net wrote:
very simple one, however I will ask
>I want to store the following number (25834242042) as an int, I declare it as usual:
>
>int var = 258342042;
>
>yet the number is obviouslu too large to store as an integer (even an unsigned one).
>Subsequently I try to store it as both 'float' and 'double' - yet they wont even hold a number of
>this size!
>
>What can I do to get a larger varable declaration???
Hi
Try:
long long var=258342042;
printf("%lld,var);
It will work.
Moshe
- Raw text -