How do I write a printf statement for a unsigned integer 40000 left justified in a 15digit field w/8digits?
461539
printf("%-15u&#92;n",40000);\n\nprovided I understood it correctly.
458677
There's a very explicit algorithm which explains\nhow to handle number, operators (including left\nor right precedence), functions, etc. on the \nWikipedia site for RPN (see reference #1).\n\nMostly, it's very straight-forward.  If it's an operand\n(ie. a number), then push it on the stack.  If it's an\noperator, then pop off as many operands are needed and\nevaluate.\n\nBut do look at the full algorithm for the details.\n\nOh yeah, for a full-blown implementation, see the source\ncode to the Unix "dc" (desk calculator) program.  The\nSolaris source is at reference #2.
374089
It has 2-bytes code, so you need to examine two consequent bytes. It is not C++ specific, it is PC-specific.
1009555
Unsigned: 2 power 6, that is 64(0-63).\nSigned: 2 power (6-1), that is 32(0-31) /* 1 bit for sign */.
114514
I have the answer.\n\nYou should change the numbers to be "400.0" instead of "400". This is your primary problem.\n\nThe deeper reason that this is happening is that 400*400/400 is an INTEGER expression. It will be evaluated as an integer, and only assigned to a floating point result.\n\nI believe that your compiler is a 16 bit compiler, this is the only answer that makes sense.\n\nNow let's just see what the compiler is doing. Its first step is to evaluate 400*400. Now if you get out your calculator, you will get the answer 160,000. NOT SO FAST!!!! An integer in your compiler is only 16 bits long, and can only express numbers between -32768 and 32767. The answer that it comes up with is 28,928 (160,000 - 2*65,536). It will next divide 28,928 by 400 to give 72 (again it drops the fractional result because it is integer).\n\nIn both C and C++, the result of an integer expression is an integer. It does not matter if it gets assigned to a float or not. If you want float accuracy, then the numbers in the expression must be floats.
334651
If you use an array, then use the mod operator to choose the first element of the array to access the array once you have passed the last element of the array. \n\ni = 0; \nwhile (1)\n{\n   printf ("%d", a[i%n]); // 'n' is the size of the array\n   i++;\n}
400127
C  H   O\n.6  12   6\n\nWITHOUT DECIMAL POINT
220005
Use a string. Calculate the first 16 digits, then put them into a string and subtract that number from your value and then use it as though its scientific notation. For example\n3.141592653589793 is the first 16 digits. So convert that to a string and then multiply your deriving value by 1,000,000,000,000,000 and start again. Then strip out the decimal and append to the string\n"2384626433832795"\nand then\n"0288419716939937", "5105820974944592", "3078164062862089",\n"9862803482534211", etc. \n\nThis should allow you a very large item.\n\n\nThe other option I can think of is declare an array 5 or 10 digits each and then store the numbers in there. That might work.\n\n\nEither way, good luck!
535427
To do this, you have to do sin^-1 * decimal. Because Yahoo Answers only displays up to .0145, I'll do sin^-1 * .0145, which would be about 0.8308
315839
keep a table of binary 4 bit equivalents 0 1 2 ... F of hexadecimal degits.\nconvert each 4 bits of your binary no. to equivalent hex. no looking the table.\n\nyou got the answer
163688
If you just want an integar value, you can use the 'parseInt()' method of the 'Integer' class which takes a string (the number) and a integer radix (or base).  The radix, or base, can be 2 for binary, 8 for octal, 10 for decimal and 16 if you wish to parse hexadecimal.\n\nfor example:\n\nparseInt("1100100", 2) would return the integer value, '100'.  You can use then use toString() on the resulting integer value in order to get a string representation of the integer back.
770189
Number will have to be the actual number it is working it out from..and it might not work as a long and definately not an integer.\n\nNumber as String\nOdd as Long (or Integer)\nEven as Long ( or Integer)\n\nIf Not (Number <1 or Number > 10) Then\nNumber = Number / 2\nIf InStr(Number, ".5") then\nOdd = Odd + 1\nElse\nEven = Even + 1\nEnd If\nEnd If\nMe.Print "Odd: " & Odd & " - " & "Even: " & Even
966120
try this stuff... pls understand the logic...\n\n#include<stdio.h>\n\nint main()\n{\nint no,rem;\nscanf("%d",&no);\nwhile (no)\n{\nrem = no % 10;\nprintf("%d",rem);\nno = no / 10;\n}\n}
685997
u should write it like\n7.52*10^-4
225035
Try 31545.  Leave off the 0.
1152676
To write a very very very LARGE or SMALL decimal number
479514
It printed this for me 0♦8\n\nHope this Helps.\nGood Luck!!!