107 Topics

Member Avatar for mrnutty

hi everyone, I was practicing binary search with array and encountered a problem. My code works but I can't help to make one part of it better. Well look at my code to understand my question better. [code] int binary_search(int arry[], int size) { int first = 0; int last …

Member Avatar for Jacky1
0
130
Member Avatar for mrnutty

Hello all, I am just practicing on class. From what I have learned thus far (from the internet) I made a simple program that resembles picking a deck of cards. But my problem is that although it works. I cannot get it to generate different cards for each object. To …

Member Avatar for Salem
0
116
Member Avatar for mrnutty

hello, I just wanted your input on this program(can it be more efficent?...and so on ). It's a simple program. It reads 5 integers and checks if its an palindrom or not. As you can see I am a beginner. here is my code: [code] #include<iostream> //#include<string> //#include<ctime> //#include<cstdlib> //#include< …

Member Avatar for grumpier
0
99
Member Avatar for mrnutty

This code Associates each number with cards, so 1 = ace of hearts/spades/diamonds/clubs, 2 = 2 of clubs/spades..... and so on so here is the code [code] void DeckToCards(int Deck[]){ //Sets each element into Cards; for(int i=0;i<52;i++) { switch(Deck[i]){ case 1:{ if(Deck[i]==1 && i<14)//Clubs char Aces_C[]= " A (of clubs)"; …

Member Avatar for dougy83
0
138
Member Avatar for mrnutty

hi, I wanted to know how to generate random characters, but more specifically , only A,Q,K,J. This will be for a blackjack game program.

Member Avatar for dmanw100
0
136
Member Avatar for mrnutty

This question is for all the programmers. What makes a good prgoammers? What made you get a job? Why are you a programmer? This is not a interview, or nothing like that. This is just someone that is curious about those question. Thank you for answer or even viewing this …

Member Avatar for Narue
0
89
Member Avatar for mrnutty

The program i made below is a c++ program. All I ask for is some feedback of my program. This program has a menu of option, but I have only implemented option 1,2,3,7thus far. So here is the code. [code] #include<iostream> #include<ctime> #include<cstdlib> #include<cmath> #include<string> using namespace std; void MemoryMatchingGame();//The …

Member Avatar for mrnutty
0
487

The End.