hi everyone ;)
i'm am having a problem, can you help me how to save big number into array?
i have to input two big numbers (20 digits or less) and sum them.
please help
harryoma
0
Newbie Poster
Recommended Answers
Jump to PostHave you any code?
What are the problems you have with it?
Jump to PostFirst declare an array and put your cin in a loop to read in every digit of your bignumber. Check if it's a digit and put it in the array.
Jump to PostYou can read in a string like this :
string Mystr;
cout << "What's your name? ";
getline (cin, Mystr);
Jump to Postbut getline only works with letters not with numbers
strange... what if my name is U2 ?
All 13 Replies
ddanbe
2,724
Professional Procrastinator
Featured Poster
harryoma
0
Newbie Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
harryoma
0
Newbie Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
harryoma
0
Newbie Poster
mrboolf
122
Junior Poster
harryoma
0
Newbie Poster
mrboolf
122
Junior Poster
VernonDozier
2,218
Posting Expert
Featured Poster
harryoma
0
Newbie Poster
mrboolf
122
Junior Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
mrboolf
commented:
lol
+2
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.