can someone help w/ integers?
110586
Multiplication/Division\n+ and + give you a positive answer.\n- and - give you a positive answer.\n+ and - give you a negative answer.\nIf you have an odd number of negative signs your answer will be negative.\nAddition/Subtraction (subtraction is just adding a negative)\n+ and -, the sign will be the sign of the integer with the larger absolute value.  (ex. -4 + 6 = 2, since 6 is bigger than 4 we give the answer a positive sign).\n+ and +, answer will be positive.\n- and -, answer will be negative.\nIt also helps to think about a number line.  Mentally place your first number on the number line; adding a + number moves right and adding a - number moves left on the line.\nHope this helps :-)
169151
int\nmain (void)\n{\nfor(i=0;i<10;i++){\nprintf("some thing output here %d", i)\n}\n}
1084101
You must cast legs to an integer using parseInt\n\nlegs = parseInt(legs);
739570
d2 - =int(c2/10)\n\neasy
997805
==================\n#include <iostream.h>\n\nint main(void)\n{\n\n   int count; // holds the count\n   float sum, number, avg;\n\n   sum = 0.0;\n   count = 0;\n\n   cout << endl << endl   //  Make some space\n        << endl << "Enter a number.  Enter a zero (0) when you have"\n        << endl << "finished entering numbers and want to compute the"\n        << endl << "average of the inputted numbers." ;\n\n   do {\n         cout << endl << endl << "Data element #" << count + 1\n              << ": ";\n\n         cin >> number;\n\n         if (number != 0.)\n           sum = sum + number;\n           count = count + 1;\n\n      } while (number != 0.0);\n\n      averg = sum / (count-1);\n      cout << endl << "The average is: " << avg\n           << endl << endl ;\n      return 0;\n}\n\n\n==================\n\nThis program computes the average of a set of data values. Commented a bit for you to understand\n\nEnjoy
515624
You can start off by declaring a new integer variable "low", initialize it to 0, and then after any input compare the new value to the value in low and if the new value is lower then set low equal to the new value.\nThe following sites should also be of use.
158397
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}
241489
Try any of this code\nDim i as integer=Convert.ToInt32("your number as string")\nor\nDim i as integer=Val("your number as string")\nor\nDim i as integer=CInt("your number as string")
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.
9961
0,1,1,2,3\n\nto get the next number add the previous 2 numbers
972788
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
90440
int main()\n{\nint minutes,hours;\nprintf("Enter the number of minutes /n");\nscanf("%d",&minutes);\n\nhours=minutes%60;\nminutes=minutes-(60*hours);\n\nprintf("Time is %d hours and %d minutes",hours,minutes);\n}
743647
Dim i, total As Integer\ntotal = 0\nFor i = 0 To Integer.Parse(TextBox1.Text) Step 2\n     total += i\nNext\nMsgBox(total.ToString())
149171
1,365\n\nor 15!/(11! * 4!)\n\nie n!/[k! * (n-k)!]
961194
you can use /, % operator to extract digits. \nyou also have to make two void functions. which will translate numbers into digits. \n\nvoid data(int num)\n{\n  switch(num)             \n{\ncase 0: \n         break;\ncase 1: cout<<"One ";\n         break;\ncase 2: cout<<"Two ";\n         break;\ncase 3: cout<<"Three ";\n         break;\ncase 4: cout<<"Four ";\n         break;\ncase 5: cout<<"Five ";\n         break;\n}\nand just keep going till twenty.\nand then another function which convert numbers from 20-100 into words. \n\nvoid getdata(int num)\n{\n  if(num>=90)                     \n                                  \n{\n cout<<"Ninety ";\n less20(num-90);\n}\nelse if(num>=80)\n{\n cout<<"Eighty ";\n less20(num-80);\n}\nyou have to complete it.\nexample to extract the digits for first and tenth position.\ndigit=number%10;                     \nlast_two=digit;\nnumber=number/10;\ndigit=number%10;\nlast_two=(digit*10)+last_two;\n\nnow just figure out the positions. \nand you are good.
95584
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!
1056055
1) You should try making a flow-chart to see the issues here...\n\n2) Your comparison:  if %1==%1 (and also for %2) will ALWAYS BE TRUE and will never get to parts of your code!