c++ computer programming question 3.please help!?
956311
I'll tell U something that could help in the reverse task\n\nU can use one of two things\n\n1-\nby includeing <string> & < algorithm>\n\nvoid revers(char* a,int length)\n{\n     string s = a;\n     reverse(s.begin() , s.end());\n     a = s;\n}\n\n2- \nby using a loop\n\nvoid reverse(char *a,int length)\n{\n     int i=0;\n     for(i=0;i< = (length/2) ;i++)\n          a[length-i-1] = a[i];\n}
1065652
void main()\n{\ncout<<"no"<<"/t"<<"id.no"<<"/t"<<"name"<<"/t"<<"sex"<<"/t"<<"department";\ncout<<"1 001/98 sarafcomputerscience&#92;n";\ncout<<"your information";\ncout<<"your information";\ncout<<"your information";\ncout<<"your information";\n\n}\nif u want to get input at runtime try to input thr cin>> statement and get that output by cout statement
930756
#include<iostream>\nusing namespace::std\n\nvoid main(){\ncout<<"Plz enter a number"<<endl;\nint x;\ncin>>x;\nif(x!=4)\n{\ncout<<"Well Done"<<endl;\n}\nelse {\ncout<<"The Number You Entered is 4"<<endl;\n}\n\n};\n\nI GUESS THIS IS WHAT YOU MEAN. YOU DONT NEED A BOOLEAN OPERATOR IN THIS CASE.
876944
I'm not fully sure of what you're trying to do here, but if you're trying to make sub-menus you can simply put all of the cout and cin statements for each sub-menu in between the cout<<" You selected... etc."; and the break statements. If you want it in another function, you can do:\n\nint main() {\n\n   //Other lines of code...\n\n   switch (choice)\n   {\n      case 1:\n         cout<< " You selected item 1.&#92;n";\n         //Call the first menu\n         menu1();\n         break;\n      }\n   }\n\n   void menu1() {\n      //This is the first menu!\n      int choice;\n      cout<< "This is the first menu...&#92;n";\n      cout<< "Pick something!&#92;n";\n      cin>> choice;\n      //Do other stuff here\n   }\n\n\nSorry if this doesn't help; I don't know C++ very well, and if you could expand on what you want to do I could help more. If this is what you want, then it's all good!
588997
I use "C++ How to Program" by Deitel & Deitel.\nIt's really good
813680
i'll give you the basic syntax..fill in the rest yourself\n\n#include<iostream.h>\n#include<conio.h>\n#include<stdio.h>\n\nvoid main()\n{\n  clrscr();\n   cout<<"&#92;t&#92;t Currency converter "<<endl;\n  cout<<"&#92;n 1) US dollars to peso "<<endl;\n  cout<<"&#92;n 2) US dollars to Euros "<<endl;\n  cout<<"&#92;n 3.........  "<<endl;\n  cout<<"&#92;n 4 ..... "<<endl;\n .....................................\n........................................\ncout<<"&#92;n enter your choice ";\ncin>>choice;\n\nswitch(choice)\n  {\n     case 1:\n       clrscr();\n        cout<<"&#92;n enter the amount in US dollars you want to convert to pesos ";\n      cin>>amount;\n      cout<<"&#92;n&#92;n "<<amount<<" dollars are equal to "<<amount*9.32 <<" pesos "<<endl;\n     break;\n     case 2 :\n        clrscr();\n        cout<<"&#92;n enter the amount in US dollars you want to convert to Euros ";\n....................................\n ...........................\n   case 3:\n ...................................\n...\n\ndefault :\n   cout<<"&#92;n invalid choice...";\n   exit(0);\n   }\n\ngetch();\n   \n\n}
742648
#include<stdio.h>\n#include<conio.h>\nvoid main()\n{\nint n=5,i,j;\nclrscr();\nfor(i=1;i<=2*n-2;i++)\n{\nprintf(" ");\n}\nprintf("1&#92;n");\nfor(i=2;i<=n-1;i++)\n{\nfor(j = 1;j<=(n-i)*2;j++)\nprintf(" ");\nfor(j = i;j<=2*i-1;j++)\n{\nprintf("%d ",j);\n}\nfor(j = 2*i-2;j>=i;j--)\n{\nprintf("%d ",j);\n}\nprintf("&#92;n");\n}\nfor(i = n;i<=2*n-1;i++)\nprintf("%d ",i);\nfor(i = 2*n-2;i>=n;i--)\nprintf("%d ",i);\ngetch();\n}
676530
In c++\n\n#include <iostream.h>\n\nint main(int argc, char* argv[])\n{\n printf("Hello World!&#92;n");\n return 0;\n}
1094860
By the sound of it, either you need a tutorial or you're asking about code formatting.   Try the tutorial at the first URL below.  For formatting stuff, you can search for "C  +code formatting" and get a few hits;-)  I hope this will get you started.   I've also included a link to lots of free resources such as compilers, editors, articles and other helpful sites.  Good luck!
138457
Assuming this is in C, this is an impossible problem given the main program you provided, because you're passing in the parameters by value rather than by reference.  So any changes you make to those values inside the function will disappear once you return to the main context.\n\nIf you're allowed to change the main program to use pointers, you could do this:\n\nvoid sort2 (int *a, int *b) {\n  int tmp;\n\n  if (*a > *b) {\n   tmp = *a;\n   *a = *b;\n   *b = tmp;\n  }\n}\n\nGiven your main program, you'd call it like this:\n  sort2(&u, &v);\n\nBut it may be that this assignment was given to you specifically to demonstrate that you can't change the value of variables that you pass in by value).
188148
try this:\n\nnumber of elements in the array is "n"\nnumbers are stored in array "Numbers"\n\nfor (i = 0; i < n - 2; i++)\n{\n   for (j = i + 1; j < n - 1; j++)\n   {\n      for (k = j + 1; k < n; k++)\n      {\n         cout << Array[i] << "," << Array[j] << "," << Array[k];\n      }\n   }\n}
225161
The quick answer is that you would know how to program in c++. I dont think most people would want to write that for you just to give an answer but you never know. \n\nTry using planetsourcecode and see if you can find something similar enough to modify...
411292
static_cast<int>("A") = 65\n\ngives you the ASCII value of the character\n\nWhole program:==============================================\n\nchar array[25]={'A','B',.....'Z'}\n\ncout << "Enter number: ";\ncin >> number\n\nif(number <= 10){\n  cout << number;\n}\nelse\n cout << array[number- 10];\n\nThat is the basic program you need to write it will work just dress it up to look pretty
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}
126096
hallo their.ur prob can be easily solved,i guess.if u know C then its pretty easy.Do u have enough time?if u have i would recommend class 11th n 12th text books(Computer Science With C++) by Sumita Arora n Gautam Sarkar.else u can always go for C++ by Balaguruswamy.this is the authors name.go to any book stall n ask this name.he has written both C n C++ books.i actually dont remember the name of the book.
678911
Check out the site at http://www.pscode.com - I don't do C++ but I use that site all the time for Visual BASIC stuff I work on.
400012
a programmer wont waste his/her time here!\nso there is no one to answer you ;)