for ex: \ncin>>356; to a=3 , b=5 , c= 6;\nlike this ; maybe array?what you think?
206223
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}
545067
Put a number in box A1\nPut a number in box A2\nClick in box A3\ntype "=A1-A2"\n(you don't type the question marks, just what is inside them)\nHit enter
511991
Start out by letting (x,y) be a point in AnB.  As it is in AnB, it must be in A.  So, x=>0 and y=>x. [We've gotten the x=>0 part, now we just need the x=y bit.]  (x,y) is also in B, so x=>y.  Now we have that y=>x and x=>y.  The only way that is possible is for x=y.\n\nQED
495815
Try this:\n\nvoid addIt(int* begin, int* end, int x)\n{\nint* p;\nfor (p=begin; p!=end; ++p) {\n*p = *p + x;\n}
150645
1>INPUT 1\n2>STORE 1 in A\n3>STORE 1 in B\n4>ADD A to B\n5>STORE A\n6>DISPLAY A\n\nThat's total of 6 steps. If you have 2 different numbers than you will have one more step of INPUT 'X' so it will be total 7 steps in that case.
37744
I rember doing something like this: you had to take the int you store the input in, and divide it by ten with the mod operator (%), and store it in a new int.  Since the mod operator divides the two numbers, and then returns the remainder, that will separate your last number.  For example:\n\nSay the input is 4321, and you have it stored in int input;\n\nint first_num = input % 10;\n\nthis takes your value in input, divides it by 10, then takes the remainder and stores it in first_num.  In this case, first_num should now equal 1.  \n\nAfter that, you have to shorten your input from 4321 to 432 by dividing (regular dividing this time) it by ten, and storing it in another new int.  (Since int can't have any decimals, dividing by ten just shortens it by the first number).  Then you do the whole thing over until you have all four numbers in separate ints, and then output them to separate lines.  \n\nHope that's clear enough--it's hard to explain this stuff so it's easy to understand.  Good Luck!
461438
Here is a program which first computes all the values and then, print it in the actual table manner. If value is 34, table for 1 to 10 will be printed first, then from 11 to 20, 21 to 30 and then from 31 to 34. \n\n#include <stdio.h>\n#include <conio.h>\n\nvoid main()\n{\n clrscr();\n int a[50][12];\n int n;\n printf("Enter the number till which you need tables ");\n scanf("%d",&n);\n for(int i= 1;i<=n;i++)\n  for(int j=1;j<=12;j++)\n   a[i][j] = i*j;\n\n for(int k=1;k<=n/10;k++)\n {\n\n  for(i = 1;i<=12;i++)\n  {\n   for(int j = (k-1)*10+1;j<=(k-1)*10+10;j++)\n    printf("%d&#92;t",a[j][i]);\n   //printf("&#92;n");\n  }\n  printf("&#92;n");\n  getch();\n }\n\n for(i = 1;i<=12;i++)\n  {\n   for(int j = (n/10)*10+1;j<=n;j++)\n    printf("%d&#92;t",a[j][i]);\n   printf("&#92;n");\n  }\n  printf("&#92;n");\n\n}
19189
use bitwise operators. something like:\n\nnum_bits = 0;\nfor(i = 0; i < 32; i++) {\nif number & (1<<i) num_bits++;\n}\n\nnow num_bits holds the number of bits that were set in number. The "<<" operator does bit shifting. So "1<<i" equals a number that's all 0's except for a 1 at position i. If you bitwise and that with something, that tells you if that bit is set in the number. So we do this for each of the bits and add up the results.\n\nThis is assuming 32-bit integers. Adjust accordingly for 64-bit integers.
37563
thats not a big issue.....u can rearrange the letters to numbers...for example if the problems lists the coordinates as a,b,c,d etc....mark a=1, b=2, c=3 atc....\nhope this helps
313979
These three sequntal clock wise numbers \n2+3+4 --> 9+4 --> 1 (adding the last no.(4)\nBut not works for all
309171
ok, here is one declaration, of many;\n\nfloat Doc(int arr[100], int NumCt)\n{\nfloat sum = 0.0;\nfor (int i = 0; i < NumCt; i++)\nsum += arr[i];\n\nif (!NumCt)\nreturn sum;\n\nreturn sum / NumCt;\n}
450835
if you are using a "while" or "do while" loop\n\nwhile ((x1 - x0) > 0.001)\n{\n//your code here\n}\n\nor you can do this\n\ndo\n{\n//your code here\n}\nwhile ((x1 - x0) > 0.001);
62710
C solution:\n\nint nr[20];\nint valid=1,i,j;\nint main(int argc, char **argv){\nfor (i=0;(i<20)&&(valid);i++){\n scanf("%d",&nr[i]);\n if (nr[i]<10)||(nr[i]>100){\n  printf("Invalid number");\n  valid=0;\n }\n for (j=0;j<i;j++)\n  if (nr[j]==nr[i]){\n    printf("Duplicate number");\n    valid=0;\n  }\n}\n}
78434
Try this:\n\n#include <stdio.h>\n\nmain()\n{\nint size,array[50],n,m,border,max,buf,step;\nint i, j, temp;\n\nprintf("Input number of elements in array:");\nscanf("%d",&size);\n\nfor(n=0;n<size;n++) {\n  printf("input %d. element of array:",n+1);\n  scanf("%d",&array[n]);\n  }\n\n for (i=(size-1);i>=0; i--)\n  {\n   for(j=1;j<=i;j++)\n    {\n     if(array[j-1]>array[j])\n      {\n       temp=array[j-1];\n       array[j-1]=array[j];\n       array[j]=temp;\n      }\n     }\n   }\n\nfor(n=0;n<size;n++)\n   printf("%d. element: %d&#92;n",n+1,array[n]);\n\n}\n\n\n\nHERE IS MY OUTPUT:\n\nInput number of elements in array:8\ninput 1. element of array:6\ninput 2. element of array:2\ninput 3. element of array:3\ninput 4. element of array:5\ninput 5. element of array:1\ninput 6. element of array:4\ninput 7. element of array:5\ninput 8. element of array:7\n1. element: 1\n2. element: 2\n3. element: 3\n4. element: 4\n5. element: 5\n6. element: 5\n7. element: 6\n8. element: 7
234640
1: x<12\n2: x>257\n3: x>42\n4: x>84\n5: x>25\n6: x>179\n7: x<8\n8: x>577\n9: x<113
119833
in c:\nchar name[20];\nfor(i=0;i<=20;i++)\n  {\n   scanf("%c",&name[i];\n   }\nfor(;i>=20;i--)\n {\n  printf("%c");\n};\ni think this will wrk;\nthe logic is jst accept the name into a char array and start reading back.
450032
Ok, your question makes absolutely no sense.  Why say we can only use 1 through 16, and then say we can only use 1?\nSome ways, assuming I translated your question correctly, would include 16 + 16 +1 +1, and 16 + 15 + 3.... There are almost an infinite number of ways to add to 34 with the numbers 1-16, so please rephrase your question.