hi Can anyboby give me algorith to write a C program for the game "Cows and Bulls"?
408086
http://www.planet-source-code.com/vb/scripts/BrowseCategoryOrSearchResults.asp?txtCriteria=cows+bulls&blnWorldDropDownUsed=TRUE&txtMaxNumberOfEntriesPerPage=10&blnResetAllVariables=TRUE&lngWId=3&B1=Quick+Search&optSort=Alphabetical
206633
I dont know if this will help but try these sites listed...\n\n\nhttp://gcc.gnu.org/\n\nhttp://www.goosee.com/x86/index.html
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}
971319
#include <iostream>\n#include <iomanip>\n\nusing namespace std;\n\nint main() {\n\n  cout << "Welcome to F&#92;'Zone&#92;n"\n      << "&#92;n"\n      << "Please select from the following menu.&#92;n"\n      << "&#92;n"\n      << "1: Quarter pounder combo&#92;n"\n      << "&#92;n"\n      << "2: Bacon burger&#92;n" \n      << "&#92;n"\n      << "3: Swiss mushroom burger&#92;n"\n      << "&#92;n"\n      << "To place your order, enter the number of the meal you would like.&#92;n"\n      << "For instance enter 2 for a Bacon Burger.&#92;n"\n      << "&#92;n"\n      << "Please enter your selection now: ";\n  char x;\n  x = getchar();\n  double total = 0.0;\n  switch (x) {\n    case '1' :\n      total = 4.59;\n      cout << "Would you like a &#92;'biggy&#92;' size? It costs $0.39 extra.&#92;n"\n          << "Type in a 'Y' or a 'N': ";\n      //x = getchar();\n      cin >> x;\n      if (x == 'Y') {\n        total += 0.39;\n        cout << "You have chosen to have a &#92;'biggy&#92;' size.&#92;n";\n      }\n      cout << "Would you like cheese with that? It costs $0.25 extra.&#92;n"\n          << "Type in a 'Y' or a 'N': ";\n      //x = getchar();\n      cin >> x;\n      if (x == 'Y') {\n        total += 0.25;\n        cout << "You have chosen to have cheese.&#92;n";\n      }\n      break;\n    case '2' :\n      // similar to 1, just change the price and messages.\n      break;\n    case '3' :\n      // similar to 1, just change the price and messages.\n      break;\n    default :\n      cout << "You have not ordered a menu item.";\n      return 1;\n  }\n  cout << "The total of your order is $" << setiosflags(ios::fixed)\n      << setprecision(2) << total << resetiosflags(ios::fixed);\n}
1028478
Get a book to teach you C and then go from there. You can use a free compiler such as gcc to get you on your way.
164996
go to http://www.happypenguin.org There are tones of Open Source games there so you should be able t find a suitable one. Have fun
207892
I'm not going to write any code for you, but I've got some ideas.\n\nIf you don't care whether the program uses real words, then implementation should be pretty easy.\n\nFirst, for each sentence, have the program decide how many words should be in the sentence. Then, for each word, have the program decide how many letters should be in the word. The program should alternate between consonants and vowels in order to ensure that the gibberish is still pronouncable. The program could also have a set probability for inserting parenthesis or commas, perhaps 1 in 7 for a comma and 1 in 40 for parenthesis. Be sure that the first word in the sentence begins with a capital letter. At the end of the sentence, the program should decide whether to end with a period, question mark, or exclamation point. You can then repeat for however many random sentences you would like.\n\nNow, if you want the program to use REAL words, you'll have to do a bit more work. First, you'll need a list of words, a "dictionary" so to speak. This will need to contain a lot of information if you want to make sentences using real words. You'll need information about its part of speech (noun, verb, adjective, adverb, interjection, etc.), gender (masculine, feminine, neuter), if the word is a verb whether it has any irregular forms or whether the verb is transitive or intransitive, if the word is a noun whether it has irregular plurals (e.g. "datum" and "data", or "goose" and "geese") or whether it's a proper noun none, some, or all of the time, if the word is an adjective whether it can be made into an adverb by adding -ly, and basically information for any other question that might come up when making a sentence. That's probably more than enough work right there. BUT, once that's taken care of, the program can use the random number generator along with the rules of grammer to make a sentence "framework", then simply select random words of the right part of speech to "fill in the blanks". For example:\n\n(?article?) (?adjective?) (noun) (?adverb?) (verb) (?article?) (?adjective?) (?noun?)\n\nThe question marks indicate optional parts of speech for such a framework sentence. The program might make sentences like the following:\n\nA blue apricot graciously impregnates the tall monkeys.\nThe car likes reality.\nBarns reluctently hold a safe hose.\nA baby vomits.\n\nIf you get really advanced, you can create other "sentence frameworks":\n\n(?article?) (?adjective?) (noun) was (?adverb?) (verb-past_participle) ?by? (?article?) (?adjective?) (?noun-posessive?) (?article?) (?adjective?) (?noun?)\n\nA velvet god was almost smashed by the delicious boss's happy dollars.\nMatthew was totally x-rayed by butter.\nA red vending machine was inflated by pride.\nThe rediculous baseballs were swallowed.\n\nIn conclusion, you'll have to apply all of your linguistic knowledge and problem solving skills -- not to mention a lot of time -- on this one. Actually it sounds like something I'd like to try. E-mail me if you're interested.
849879
here you go...\n(it'll work with up to 255 different disks, if you need more, you'll have to replace chars with ints)\n\nm1(char *a,b) {memove(b+1,b,strlen(b)+1); *b=*a; memmove(a+1,a, strlen(a);}\nm(char *a,b,c) {if (*a)  {m(a+1,b,c);m1(a,c);m(b,c,a);}
400603
Those mentioned above (Visual studio) are fine but for beginning I'd recommend something smaller and simpler... try devC++... it's free and can be found at bloodshed.net...\n\nthen (just to keep the tradition) write something like this:\n#include<stdio.h>\nmain()\n{\nprintf("Hello World&#92;n");\ngetchar();\n}\nThen hit f9 to save the file, compile it and run...
418058
most the programming softwares has the option for that, just try to figure it o. I can't tell you cos i don't write c-programs
344651
Hey, email me, LBphan@gmail.com, i might be able to help you out a bit, ive got some stuff for c++ and c# if youre curious, and ill give you whatever youre looking for free of charge.  my name is andy, by the way.
671519
c or c++ are usually used for game programming, but any language can work, if they're supported on your intended target platform (windows, unix, etc.) and provide the features necessary for your project (access to accelerated graphics, for instance).\n\nat http://www.gamedev.net/reference/articles/article892.asp you can find an (in my opinion) pretty good article on how to move into game programming: start with simple things, add complexity as you go.
966120
try this stuff... pls understand the logic...\n\n#include<stdio.h>\n\nint main()\n{\nint no,rem;\nscanf("%d",&no);\nwhile (no)\n{\nrem = no % 10;\nprintf("%d",rem);\nno = no / 10;\n}\n}
671787
There is a C language tutorial available on the net.It is available in PDF format.You can search for it on yahoo search.
781094
Nobody is going to do your homework for you. \n\nIf you're supposed to write code examples that illustrate how two comparable programs might look, then do this. Write some simple programs in C, and then re-write the same program in C++ but put the functions your void main calls in a class and instantiate the class.
1157962
Check to see if you can get a cheat sheet off the computer on Gamespot.\n\nLC
563283
You need to learn Java coding, especially client/server stuff and low-level sockets stuff. If you want to do it for free, you'll have to run the server on your own box. You'll also need to look at Swing and some way of creating a graphics engine. It'd be a lot of work - games these days are typically created by big teams.