how can greate calculator with c++ hwo count 1000 digits?
368941
I can help you with this program in C (not C++).\n\n#include <stdio.h>\n\nint a;\n\nvoid main(void)\n{\n   for(a = 0; a <= 1000; a++)\n   {\n       printf("%d&#92;n", a);\n   }\n}\n\nThe above program lists numbers starting from 0 to 1000.\nYou can modify the program to add up all those numbers if that is what you want.\n\n#include <stdio.h>\n\nint a, sum = 0;\n\nvoid main(void)\n{\n   for(a = 0; a <= 1000; a++)\n   {\n      printf("%d&#92;n", a);\n      sum = sum + a;\n   }\n   printf("Sum = %d", sum);\n}\n\nThis program prints and also finds the sum to 1000 numbers starting from 0!
869459
void main()\n{\nint n,rev=0,ro,n1;\ncout<<"enter the number";\ncin>>n;\nn1=n;\nwhile(n>0)\n{\nro=n%10;\nrev=rev*10+ro\nn=n/10;\n}\nif ( rev== n1)\n cout<<"the number is palindrom";\nelse\ncout<<"the number is not palindrom";\n}
830076
you can't really "catch" them per se, as they are really not errors, unlike floating point overflows. \nYou can do some sanity checks like the above answer explained...\nor better, just use larger storage - like unsigned long long - that'll give you more space without overflowing.
172063
http://www.thefreecountry.com/compilers/cpp.shtml
457026
Create a method called numDigits(long). Then you can use code something like this:\n\nint num;\ncin >> num;\n\nint numDigs = numDigits( num );\nint digits[ numDigs ];\nint temp = num;\nfor ( int i = numDigs - 1; i >= 0; i-- )\n{\n digits[ i ] = temp % 10;\n temp = (int)( temp / 10 );\n}\n\nThe digits array holds each of the digits in the number.\nThis is the code I used for numDigits():\n\nint numDigits( long num )\n{\nint digits;\nfor ( digits = 0; num > 0; digits++ )\n{\nnum /= 10;\n}\n\nreturn digits;\n}
269526
use yur calculator...
814965
what c++ program are you referring to ...anyway the syntax is\n\n#include<iostream.h>\n#include<conio.h>\n...include all the header files here ..\n\nint count()\n  {\n     function body\n     return value #integer value to be returned \n\n  }\n\nother functions\n\nvoid main() \n\n   {\n\n# this is the main function \n\nint a,b,c;\nfloat al,bl;\nstring str;\n\n#declare the variables\n\n#get the inputs from the user\ncout<<"enter the value of a ";\ncin>>a;\n...\n...\n\ncall the functions\n\nb=count()\n..\n#do what ever processing has to be done\n } # program closing curly braces\n\n\nhope this helps\n\nthis is a excellent c++ tutorial \n\nhttp://www.geocities.com/sstutor\n\ncprogramming.com is also pretty good
26912
I give up,what?They don't even make a calculator that will register that many digits and I sure don't want to figure it manually.I'm sure there are a lot of numbers that when multiplied would equal a 400 digit number.400 is only a 3 digit number.
10816
4,850,180,331,125,622,098 according to the calculator on Windows. \n\nThis calculator seems to be only 14 characters long, so verification can be done as follows.\nFind the hex eqv for the longest possible number there starting from the beginning. This has already been done in the earlier answer. Next, in the decimal eqv, multiply by 16^2, add 5*16^1 and 2*16^0. That should give you the answer.
751189
If you are under Windows you can turn on NumLock, and use Alt plus codes on the number pad to do some of them (Alt-253 = ², Alt-171 = ½, Alt-251 = √, etc.) \n\nAlternatively, you can use Character Map utility under Start > All Programs > Accessories > System Tools.  Then you can get lots of others:\n°±²³ΦΘΠⁿ⅓⅔⅛⅜⅝⅞∆∏∑√∞∫≈≠≤≥\n\nFeel free to copy these from here too...
894034
while (<>)\n{\n  ($n++, $uniq{$_}++, print("$_&#92;n")) foreach /&#92;+d-&#92;d+)/g;\n}\nprint STDERR "Total numbers: $n&#92;n";\nprint STDERR "Unique numbers: scalar(%uniq)&#92;n";\nprint STDERR "Individual number counts:&#92;n";\nprint STDERR "$number: $coutn&#92;n" while ($number, $count) = each %uniq;\n\nIt reads the original text from stdin, and prints the numbers to stdout, and the statitstics to stderr.\nrun it like this:\ncat original_file.txt | perl thisprogram.pl > number_only.txt\n\nThe numbers will end up in numbers_only.txt, and the statistics will show up on your screen.\nYou can also give it the original file as argument instead of that cat thing if you prefer
285803
It is\n\n   888\n  +088\n  +008\n  +008\n  +008\n --------\n  = 1000\n --------
588997
I use "C++ How to Program" by Deitel & Deitel.\nIt's really good
120558
Another answer suggested you could write your own\ncomplex functions, and while strictly possible, puts\na lot more burden on you than you might want.  There's\nvery little reason to reinvent the wheel.\n\nThe good news is that complex numbers are supported\nby both the current C ("C99) and C++ ANSI/ISO standards.\nSo if you have a recent compiler, you will just be\nable to use the complex type.\n\nIn the C++ standard, see chapter 26 (specifically 26.2).\nThe header is <complex>, and all of the expected operators\nare provided.\n\nIn the C standard, see section 7.3.  The header is\n<complex.h>, and it uses the new built-in type "complex"\nto provide all of the functions that used to only\nbe provided for float and double.
123553
Googling for Karen's Power Tools finds you\n\n http://www.karenware.com/\n\nwhich contains an unlimited precision calculator.\n\n\n\nGoogling for online Smalltalk interpreter ... it wasn't the first item so punt to:\n\n\n\nGoogling for online lisp interpreter finds you\n\n http://www.ugcs.caltech.edu/~rona/tlisp/\n\nin which you can type\n\n (* 12345678901234567890 54321)\n\nand get result\n\n 670629623593962962352690\n\n\n\nOther things to Google for might be\n\n online bignum calculator\n online calculator\n online unlimited or infinite precision calculator
478761
100,000,000,000,001 or one could give it to you in scientifi notation with a rounding error 10.0 E13
1018747
You can store as many characters in an C array as you want.\n\nAlso I suggest you change to djgpp if you something similar to turbo c++. TUrbo C++ 3 is more or less dead and was ment for DOS only. Other alternates are VC 6, GCC on Linux, GCC using cygwin on windows.\n\nThere are some errors in the code you posted along with your question.\n\nIt should be \n\nchar input[1000];\ngets(input);\n\nand not gets(&input)\nSame is the case with scanf\n\nSince the name of an arrey itself is a pointer you need not send address of pointer.