can long long store 12 digit numbers.
Its showing in my comp that limit of long long is 9223372036854775807, but then it's showing too large when i declare it like this:
long long num;
i don't want to store in array.
My seniors told that long long will do but i am having trouble.
please help.
Aseem_Pandey 0 Newbie Poster
Recommended Answers
Jump to Posta) post what you actually tried, not a description.
b) post your actual error messages
c) tell us what your OS/Compiler is.
Jump to PostTry to append LL suffix to long long constants.
Jump to PostTry
long long num=600851475143LL,large,k,i;
to tell the compiler that the constant is a long long.
Jump to Post> integer constant is too large for ‘long’ type
Oh come on, we've told you how to fix "long long" constants, can't you at least make some intuitive guess as to how to fix "long" ?And "mark as solved" is a link at one end of the thread …
All 13 Replies
Salem 5,265 Posting Sage
tux4life 2,072 Postaholic
Aseem_Pandey 0 Newbie Poster
Aseem_Pandey 0 Newbie Poster
tux4life 2,072 Postaholic
ArkM 1,090 Postaholic
Salem commented: ArkM blazes in with both barreLLs for the win ;) +33
tux4life commented: Sometimes it's so simple that you even don't think about it :P +8
Salem 5,265 Posting Sage
Aseem_Pandey 0 Newbie Poster
Aseem_Pandey 0 Newbie Poster
siddhant3s 1,429 Practically a Posting Shark
Aseem_Pandey 0 Newbie Poster
Salem 5,265 Posting Sage
siddhant3s 1,429 Practically a Posting Shark
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.