how can split the input variables , for example: cin>>231;      in c++ ??
438944
#include<stdio.h>\n#include<conio.h>\n#include<ctype.h>\n\nint main()\n{\n  char ch;\n  cout<<"enter some text&#92;n";\n  do{\n    ch=getch();\n    putchar(ch);\n  }while(ch!='&#92;n');\n  return 0;\n}
274717
for( int i = 55; i > 0; i-- )\n  printf( "%d&#92;n", i );
49715
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.
169151
int\nmain (void)\n{\nfor(i=0;i<10;i++){\nprintf("some thing output here %d", i)\n}\n}
808564
printf("$%i.%i",dollars,cents);\n\nor if you have a floating point value you can do\n\nprintf("%5.2f",money);
1047890
class C\n{\npublic:\nenum { NUM_VALUES = 10 };\n\nprivate:\ndouble m_values[NUM_VALUES];\n\npublic:\n// Sets the number stored at index i in m_values to v\nvoid SetValue(int i, double v) throw( std::exception )\n{\nif ( i < 0 || i >= NUM_VALUES ) throw std::exception("Index out of range");\nm_values[i] = v;\n}\n\n// Gets the number stored at index i in m_values\ndouble GetValue(int i) const throw( std::exception )\n{\nif ( i < 0 || i >= NUM_VALUES ) throw std::exception("Index out of range");\nreturn m_values[i];\n}\n\n    // Returns the mean of the numbers stored in m_values\n    double GetMean(void) const \n    {\n        double sum = 0;\n        for ( int i = 0; i < NUM_VALUES; i ++ ) sum += m_values[i];\n        return sum / NUM_VALUES;\n    }\n\n    // Returns the sample standard deviation of the numbers stored in m_values\n    double GetStandardDeviation(void) const \n    {\n        double mean = GetMean();\n        double sum = 0;\n        for ( int i = 0; i < NUM_VALUES; i ++ ) sum += (m_values[i]-mean)*(m_values[i]-mean);\n        return sqrt(sum/(NUM_VALUES-1));\n    }\n};
195373
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
779217
There are built-in functions in a programming language to perform that task.For instance in C++ we have: cint("string value") for converting the string value into integer.And in Visual Basic we have the val() function to do the same thing.
935645
main() { static char *a="n0body"; char b[512],*c,*d;\n  while (c=gets(a)) for (d=a;c;*c^=*d,c++,d=*++d?d:a);\n  printf ("%s&#92;n",b);}\n\n\nhappy?
985771
You can generate this in one line of Perl, Unix scripting, or a small C/C++ program.  Simply write one number per line from your program counter.  You may have to get tricky and use two long ints, but it's not hard.\n\n Realize that your document may be very large, and for most purposes, you don't need a document, just use the variable(s) in your final program.
392646
You usually do this by using a programming language and comparing the input to a regular expression.\n\nLook up "regular expression tutorial" in Yahoo search and you'll find more information that you probably want  :)
765887
Assuming your above program works, which I don't think it will because your doing an aggregate operation on an array..you should assign values to indexes in the array...eg cin >> Date[0] or use a for loop or something...regardless since your putting everything in an array anyway simply do something like using a counter variable, personally i think it would be the easiest way of doing something like that.\n\nint counter = 0;\n\ncout << enter day to subtract << endl;\ncin   >> counter;\ncout << Date[1]  - Date[counter] << endl;\n\nI belive using
1184809
take the variable in float, then add %2. for 02 and %.2 for 0.02
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
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}
74472
Use ToString() with a format, like ToString("#.00"), as in...\n\nDim test As Double\ntest = 0\nSystem.Console.WriteLine(test.ToString("#.00"))
288451
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.