2,712 Posted Topics

Member Avatar for mrnutty

I made a program that computes a factorial of a number. [code] #include<iostream> #include<fstream> #include<cmath> #include<iomanip> #include<string> using namespace std; //unsigned __int64 Fact(unsigned __int64 x ); int main(){ unsigned __int64 num = 100; unsigned long double fact(1); for(unsigned __int64 i=1;i<=num;i++) { fact *=i; cout<<setprecision(50)<<"i is : "<<i<<" fact is : …

Member Avatar for MosaicFuneral
0
148
Member Avatar for mrnutty

hi, I was trying to implement the sieve of eroathoses (I know I spelt this wrong) and it works. But i was trying to find all prime under 2 million. The .cmd for visual studio just corrupts if I try to find all prime under 2million. I am guessing It's …

Member Avatar for Freaky_Chris
0
365
Member Avatar for mrnutty

Can i call a class on another class. ex. class a { public: void add (int,int) ... //maybe call class b here.../// }; class b{ public : void mult(int,int)... };

Member Avatar for ArkM
0
89
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 ademsaykin

I have fixed most of your problem. But your function is just missing some identifiers(ex , insted of int x, its just x)..All i did was change your header. look at it. [code]#include <string> #include <iostream> #include <fstream> #include <cstdlib> using namespace std; const int MAX_BOOKS = 1000; const int …

Member Avatar for ademsaykin
0
298
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 iannemic

I could help you write your code but I will do something even better . I will give you some hints of how to go about this so you can solve it yourself. And when you do, you will get the satisfaction of knowing that you did it and not …

Member Avatar for mrnutty
-2
130
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.