c++ programming ? using loop structures?
457195
the simple program given above if fine.. in terms of the conncept.. but there's a bug... \nthe problem is with looping.. coz when u enter a number such as 80301  or 55302 ( a no. having 0 in between), the loop breaks at the point when zero is encountered.\n\n so the output in the first eg. is  8 0 ,sum= 8 (instead of correct 8 0 3 0 1 , sum=12\n\n\nso the logic of handling the number is absolutely correct but the looping is a comparatively difficult job in this case!
963773
It is done in C/C++. U can check that out in any of the windows programming books.
67914
hey!! looking for ur c++ project.. source code online?? isnt a good idea!\n\nwell thetopic u've selected is idiotic.. \nu better submit an original work.. or else u'll loose marks!\n\nn if programming is ur problem.. n u're lookin for an easy way out.. try looking for tutorial sites for c++.. n search for samples .. but then be assured that ur teacher will come to know aboiut the authenticity just by the format.. \n\nwell if u're smart enough to edit the stuff n then submit it.. only then its of some use.\n\nn by the way.. i've heard of this project .. its common.. i mean even some of my batchmates did this project.. a very ordinary 1... so u may get some help from ur seniors as welll!!
526760
go to the source - The Art of Computer Programming by Donald Knuth.  It is the bible of data structures.
280948
I did C++ last year, but don't really remember it that much, so I found some websites that explain two dimensional arrays in C++:\nhttp://www.fredosaurus.com/notes-cpp/arrayptr/22twodim.html\nhttp://mathbits.com/MathBits/CompSci/Arrays/Matrix.htm\nhttp://library.thinkquest.org/C0111571/manual.php?tid=26\nhttp://www.cplusplus.com/doc/tutorial/arrays.html
604143
here is a program for 10 numbers in ascending order\n\n#include <iostream.h>\n#include <conio.h>\n\nvoid main()\n{\nclrscr();\nint array[10],t;\nfor(int x=0;x<10;x++)\n{\ncout << "Enter Integer No. " << x+1 << " : " << endl;\ncin>>array[x];\n}\nfor (x=0;x<10;x++)\n{\nfor(int y=0;y<9;y++)\n{\nif(array[y]>array[y+1])\n{\nt=array[y];\narray[y]=array[y+1];\narray[y+1]=t;\n}\n}\n}\ncout << "Array in ascending order is : ";\nfor (x=0;x<10;x++)\ncout << endl << array[x];\ngetch();\n}\n\nThis program takes in the ten integers array[x] to be stored in the single-dimensional array as a screen input from the user.\nIt then sorts out these ten integers into ascending order and prints them out using the 'cout' command.
983919
Here you go\nhttp://www.thefreecountry.com/compilers/cpp.shtml\n///
1119693
I think you might need to elucidate more on that question.\n\nPerhaps you mean how do you store multiple values in a data structure.\n\nPerhaps you mean how do you modify a "final" variable. In other languages this is called a constant. The point of this is that it cannot be changed at runtime.
253406
All you need to program in C++ is a compiler and notepage.\n\none of the more popular is located here: \n  http://www.delorie.com/djgpp/\n\nAs for examples there's TONS on the Net, a simple Google Search for 'C++ examples'  returned over 32,000 hits.
102928
I'm not a php programmer... but using other programing languages is quite simple. Use an algorithm like this: define a matrix or a vector (depends on how many numbers you want listed) and start the random procedure: first chooses a number and compares it with every variable of the matrix/vector, if it's different then write it on the page and in the current position in the matrix. This is just a pseudo-code, but it's easy.
431775
Using the odd/even integer syntax\n\ncreate a grid, numbering each of the blocks, and for all Odd number blocks, insert the command to add a star.\n\nAre you learning C++ in school?
115853
#include <iostream>\n#include <vector>\nusing namespace std;\n#define rep(i, n) for((i) = 0; (i) < (n); (i)++)\n#define rep2(i, k, n) for((i) = k; (i) < (n); (i)++)\nvoid f21();\nint n;\ndouble mat[100][100];\nint main()\n{\nwhile(true)\n{\ncin >> n;\nif(!n) break;\nmemset(mat, 0, sizeof(mat));\nf21();\n}\nreturn 0;\n}\n\nvoid f21()\n{\ncout << "****************************************" << endl;\ncout << "*          INVERSE OF MATRIX           *" << endl;\ncout << "****************************************" << endl;\n\ncout << "ORDER OF THE MATRIX: " << n << endl;\ncout << "ENTER ELEMENT ROW-WISE" << endl;\nint m = 2*n;\nint i, j, k;\nrep(i, n) {\nrep(j, n) {\ncin >> mat[i][j];\ncout <<"&#92;t";\nprintf("%5.3lf", mat[i][j]);\n}\nrep2(j, n, m) {\nif(i == (j-n)){\nmat[i][j] = 1;\ncontinue;\n}\nmat[i][j] = 0;\n}\ncout << endl;\n}\n\ncout << endl << "INVERSE MATRIX: " << endl;\ndouble pivot, comm;\nrep(i, n) {\npivot = mat[i][i];\nif(mat[i][i] == 0){\ncout << "DIVISION BY ZERO." <<endl;\nreturn;\n}\nrep(j, m) mat[i][j] = mat[i][j]/pivot;\nrep(j, n) {\nif(i == j) continue;\ncomm = mat[j][i];\nrep2(k, i, m) {\nmat[j][k] = mat[j][k] - (comm*mat[i][k]);\n}\n}\n}\n\nrep(i, n) {\nrep2(j, n, m) {\ncout <<"&#92;t";\nprintf("%6.4lf", mat[i][j]);\n}\ncout << endl;\n}\ncout << endl;\n}\n\n/*This is writen in C++ this will output the inverse of a Matrix\ninput:\n4\n1 2 3 4\n2 1 4 2\n2 5 7 12\n1 -1 3 11\n\n5\n1.173 -0.634 0 0 0\n-0.539 1.173 -0.634 0 0\n0 -0.539 1.173 -0.634 0\n0 0 -0.539 1.173 -0.634\n0 0 0 -0.539 1.173\n\n0\n*/
120342
To really hone your abilities I recommend looking over some of the programming contest problem archives.  They are on the level of a week-long programming assignment in college and teach a variety of different skills: working from problem description to solution, basic data structures, basic algorithms, testing exterme cases...\n\nBeing able to solve problems like these will prepare you for any challenge you will come across :-)\n\nI am also including a few links to C++ resources for you.\n\nGood luck :-)
557543
#include<iostream>\nusing namespace std;\nint main ()\n\n\n    {\nint number;\nint answer;\n    cout<<"Please enter number: ";\n    cin>>number;\n    \n    cout<<number<<"! = ";\n    answer = number;\n    while (number>1)\n\n\n        {\n        answer=answer*(number-1);\n        number--; \n    } \n\n    cout<<answer; \n    return 0; \n}
142433
you havn't closed "void determinecost (...)" function with curly braces " } "\n\nin c++, you have to close any block of code with } that has been opened with {
448114
In C++ you should do this:
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}