3,815 Topics

Member Avatar for
Member Avatar for taumang

i want to know the sequence of values tobe printed out by this algorithm count = 0 while(count<2) print the value of x x=x+2 else print the value of x my answers are as follows 0;2 i need clarity

Member Avatar for taumang
0
108
Member Avatar for Lelly

Hello, I started my homework and I couldn't complete it. Can anyone help me with it?? the question is: Implement the depth-first search algorithm so that it accepts input from text file in the following format: List all distinct vertex symbols (use just a single symbol: A-Z and 0-9) one …

Member Avatar for mike_2000_17
0
185
Member Avatar for Khoanyneosr

[CODE] #include <iostream> #include <ctime> #include <cstdlib> #include <string> #include <algorithm> using namespace std; //Types and Arrays string word[16] = {"GOLDFISH", "COMPUTER", "ANONYMOUS", "JACKET", "SHARP", "SERVICE", "EFFORT", "CHARACTER", "CHANGE", "WITHOUT", "PRODUCT", "UNFOLDING", "MUSIC", "MOMENT", "LIFETIME", "PROVIDE"}; // words that will be randomized. string hint[16] = {"Small colorful fish.", "A machine …

Member Avatar for daviddoria
0
191
Member Avatar for failbot

Hello, I am creating an implementation of LIST that displays a list of 4 elements and also displays them in reverse. It seems to be correctly displaying the first list but I am getting a segmentation fault error before it displays the reverse list and I am not sure why. …

Member Avatar for arkoenig
0
85
Member Avatar for chaosgeneration

Hey all, I'm currently working on a project that exemplifies matrix multiplication algorithms. My problem isn't working on the algorithms, but more of the structure of the classes. If any of you wouldn't mind looking over my code and helping me get a little more familiar with how things should …

Member Avatar for chaosgeneration
0
128
Member Avatar for Zvjezdan23

I am in need of dire help. My Yahtzee game is due in class on Wednesday. My computer recently crashed and deleted my visual studios 2010 with all of my Projects that I have done. Luckily I had a back up file on my flash drive. Sad thing is though, …

0
86
Member Avatar for lamanne

eish am strugling with this binary tree.huffman code and i ave an assignment,have a look on that You are given a text file. Any printable character, including digits and punctuation can be present in the file. Newlines and blank spaces can be present as well. Your job is to write …

Member Avatar for lamanne
0
312
Member Avatar for kinto

Hey, I have a function, though it's not working as it should be. My program is Dijkstra's algorithm, and I am trying to build a list of a node's nearest neighbours using info contained in a text file of the network (7 nodes in this case), in the form: 0,2,4,1,6,0,0 …

Member Avatar for kinto
0
232
Member Avatar for Khoanyneosr

[CODE] #include <iostream> #include <ctime> #include <cstdlib> #include <string> #include <algorithm> using namespace std; //Types and Arrays string word[16] = {"GOLDFISH", "COMPUTER", "ANONYMOUS", "JACKET", "SHARP", "SERVICE", "EFFORT", "CHARACTER", "CHANGE", "WITHOUT", "PRODUCT", "UNFOLDS", "MUSIC", "MOMENT", "LIFETIME", "PROVIDE"}; char guess[50]; static const char Y= 'Y'; static const char N= 'N'; char ans; …

Member Avatar for Khoanyneosr
0
132
Member Avatar for Khoanyneosr

[CODE] #include <iostream> #include <ctime> #include <cstdlib> #include <string> #include <algorithm> using namespace std; //Types and Arrays string word[16] = {"GOLDFISH", "COMPUTER", "ANONYMOUS", "JACKET", "SHARP", "SERVICE", "EFFORT", "CHARACTER", "CHANGE", "WITHOUT", "PRODUCT", "UNFOLDS", "MUSIC", "MOMENT", "LIFETIME", "PROVIDE"}; char guess[50]; static const char Y= 'Y'; static const char N= 'N'; char ans; …

Member Avatar for VernonDozier
0
593
Member Avatar for omer.chaudhary

friends i am doing BS(it) i want simple and easy answer for this questio can anyone help me. what is algorithm explain it?analysis of algorithm?

Member Avatar for jon.kiparsky
-1
262
Member Avatar for newgeekintown

Hello guys, I am doing my final year project on data mining using the privacy preserving techniques of genetic algorithm. I am struck on how to implement the crossover of the chromosomes(transactions). Anybody having the idea of the code in C# ,please please send it.

Member Avatar for cale.macdonald
0
100
Member Avatar for taumang

i want to know what will be the sequence of values to be print out for the following algorithm using trace table count=1 count=count + 1 while(x<2)prin the value of x elseprint the value of x My answers is 0;2;2 idon't know if they are correct

Member Avatar for Ancient Dragon
0
84
Member Avatar for mktr

i have a simple question: I want to define a hex character array in C, but I don't want to have to define the elements one at a time. my programme needs an hexadecimal array as input of 128 bits. for example, [code=c]unsigned char temp2[32]= {0x00 ,0x11 ,0x22 ,0x33 ,0x44 …

Member Avatar for Narue
0
7K
Member Avatar for Bildderfrau

Hi folks! My friend just asked me to code a program which detects ellipses of an image. The images he will use with this program have 2 different kinds of pixel values - black (0) & white (255). So I researched a bit and found an algorithm for ellipse detection …

Member Avatar for Bildderfrau
0
366
Member Avatar for Khoanyneosr

[CODE] #include <iostream> #include <ctime> #include <cstdlib> #include <string> #include <algorithm> using namespace std; // Functions int instructions(); int game(); //Types and Arrays string word[] = {"GOLDFISH", "COMPUTER", "ANONYMOUS", "JACKET", "SHARP", "SERVICE", "EFFORT", "CHARACTER", "CHANGE", "WITHOUT", "PRODUCT", "UNFOLDS", "MUSIC", "MOMENT", "LIFETIME", "PROVIDE"}; char guess[50]; char inst[50]; int main() { cout …

Member Avatar for pseudorandom21
0
1K
Member Avatar for kinto

Hello, I have some code that passes arguments between functions, though I am failing to understand why my code isn't working. This is the relevant section of my Dijkstra's algorithm code: [CODE]def network(): f = open ('network.txt', 'r') network = [[int(node) for node in line.split(',')] for line in f.readlines()] print …

Member Avatar for kinto
0
3K
Member Avatar for kinto

Hello, I am having some trouble in working out the distance of each node from the starting node in my Dijkstra Algorithm code. Here is my code with the section i'm stuck on in bold: [CODE]infinity = 1000000 invalid_node = -1 startNode = 0 class Node: distFromSource = infinity previous …

Member Avatar for woooee
0
170
Member Avatar for imhiya

I have two files; one with places then the distance between them. Example: Moffat Carlisle 65 Doncaster Hull 76 Northampton Birmingham 90 Leicester Lincoln 82 Sheffield Birmingham 122 I was wanting to use dijkstra's method, but i seem to have a problem because looking pseudo codes to understand it they …

Member Avatar for VernonDozier
0
156
Member Avatar for nickcolb

Hi, I need serious help with this code. So far everything compiles correctly but it does not output the correct change, and I've been trying for hours to figure out how to remedy the situation. All help is appreciated. This is what is being inputed: 4 1.00 .01 100.00 .01 …

Member Avatar for gunjannigam
0
102
Member Avatar for Zvjezdan23

I have trouble saving my numbers. I used an array for my saving feature. As you play the game, the computer asks you if you want to save a number. you say yes and you pick which number(s) you wish to save. My problem is, if i save 2 numbers …

Member Avatar for stav141
0
147
Member Avatar for Geeko

Hi, i was hoping that someone could help me understand what graph isomorphism is and what are some of its practical application examples ?? i really don;t get it, and is it possible to code it in Java (what i mostly see is only in C or C++)...

Member Avatar for JamieLynnSEO
0
70
Member Avatar for pseudorandom21

Hey guys, I'm making a global operator, and I have a line where I'm comparing a std::string::difference_type to a std::string::size_type, I think the difference_type is usually a signed integer, and the size_type an unsigned.. Any ideas for an algorithm change? Also, there is a lambda function used I would like …

Member Avatar for pseudorandom21
0
120
Member Avatar for skips

Hello. What i'm trying to do is simple and I know that I could just get the answer offline. However, I wanted to finish this one myself, so if someone could fix what I believe to be a small error I would appreciate it. I am simply trying to read …

Member Avatar for skips
0
151
Member Avatar for rlamarche

Need a standard fifo algorithm. for a cpu shceduler so one command comes in at a time. Please help Thank yOu

Member Avatar for template<>
0
125
Member Avatar for sharathvcool

Please guys , Please share the code to implement gutmann algorithm , to erase data in hard disk,. Please share (sharath198@gmail.com) Thank you.

Member Avatar for mKorbel
-1
63
Member Avatar for gl7

hey, kind of new to c++ started working with functions and am trying to write program using them trying to make hangman game using functions, with my following code i am getting this error message [linked error] undefined reference to 'askGuess()' id returned 1 exit status [build error] [ number5.exe] …

Member Avatar for gl7
0
148
Member Avatar for vavazoom

Hey, I am writing a program that takes the size of an nxn matrix [A], randomly creates that matrix, as well as an nx1 matrix [S], multiplies them together to create [A]*[S]=[B]. Then, using Gaussian Elimination, I use matrix [A] and [B] to find [x] such that [A]*[x]=[B]. I can …

Member Avatar for mike_2000_17
0
194
Member Avatar for dspjm

For example, I want to write a minesweeping. I know the interior algorithm, but I don't know how to start creating a gui. How should I get started? Thanks.

Member Avatar for JamieLynnSEO
0
247
Member Avatar for deviliq

Hey there :) :) :) I'm doing a "simulation" project for the first-come, first-served (FCFS) CPU scheduling algorithm. To give u an idea of what this is: CPU Scheduling is all about having a Scheduler determine which process should be allocated to the CPU next. It has many various algorithms …

Member Avatar for Taywin
0
3K
Member Avatar for Zvjezdan23

I have many things done so far in my project. However, in my switch statement it does not generate random numbers like it did earlier. You'll see what I mean. Other than that I need help with the scoring part of the assignment. Can anyone please help me? I feel …

Member Avatar for Fbody
0
625
Member Avatar for Poopster01

Below are the instructions for what I am currently working on. I am having 2 problems first is printing the values stored in my array right now i have it set up in a for loop but there seems to be something wrong with the syntax of my System.out statement …

Member Avatar for Poopster01
0
335
Member Avatar for mandy011

Hi all, I have implemented some code for simple columnar encryption. The algorithm is encrypting properly as I want. But during decryption it's giving me some errors. Please go through and suggest me if any idea [code] public static void encrypt(RandomAccessFile f,RandomAccessFile d,int columns) throws Exception { d.seek(10); // SEEK …

Member Avatar for mandy011
0
158
Member Avatar for Tarkenfire

Okay, so as a project for one of my classes I need to make a basic drawing program in VB that can do three things: [LIST] [*]"Draw" with a brush of some sort [*]Clear the screen [*]Perform a flood-fill (paintbucket action) [/LIST] I decided to do the first two tasks …

Member Avatar for Tarkenfire
0
941
Member Avatar for failbot

I recently wrote an implementation of STL Vector as a programming exercise. The program compiles but I receive a strange error saying: [CODE] terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc [/CODE] I've never come up with this error before and am not sure what exactly should be …

Member Avatar for vijayan121
0
2K
Member Avatar for cwarn23

Hi, I have just created an algorithm and could this be the greatest algorithm invented for calculating square roots? Perhaps the answer is yes with 100% accuracy unlike some algorithms that round the last digit up. Below is the algorithm I have created and I used php. Also this algorithm …

Member Avatar for mrnutty
0
844
Member Avatar for imanz

I am new to assembler, using the 68HC11 processor. I need to multiply two SIGNED 8 bit numbers using the partial product-shift algorithm. Some help in the right direction would be helpful. Thanks.

Member Avatar for imanz
0
127
Member Avatar for dvongrad

I'm not sure how to title the question I have so I can't be certain this hasn't been answered before. That said, following is a description of my programming question. I have a class R containing 2 integer elements, say X and Y. I then have two 24 element arrays …

Member Avatar for dvongrad
0
308
Member Avatar for junioryz

The source code is here: [url]http://www.policyalmanac.org/games/aStarTutorial.htm[/url] Can anybody help as to what code needs to be added to enable this pathfinding algorithm to work with a isometric 2d tile map which is based completely on this XNA tile map tutorial: [url]http://www.xnaresources.com/default.asp?page=Tutorial:TileEngineSeries:4[/url]. I just need a working pathfinding for isometric map …

Member Avatar for TheRealOrder
0
274
Member Avatar for Dani

So I was thinking all last night and all morning about what exactly the algorithm update that happened on Thursday entailed. Word on the street is that they are targeting content farms, and sites with lower quality information. Content quality is all subjective, of course, as opposed to Google's history …

Member Avatar for canadafred
0
202
Member Avatar for Dani

A new google algorithm was released yesterday which has been targeted at content farms. According to the Google blog, it affects 11% of all search queries on the web, making it one MASSIVE update. We were *significantly* hit, losing about 50% of our traffic we normally get from Google. From …

Member Avatar for addyj672
0
54
Member Avatar for rude04

hello everyone,i need to make an encryption/decryption program and I'm almost finished, the problem is when i tried to add some gui an error about throwing exception keeps showing.. this is the code without the gui and it works just fine because the [B]throws Exception[/B] is in the main.. [CODE] …

Member Avatar for rude04
0
724
Member Avatar for Lemonader

Hi. It's actually not a C++ code, it's a matlab code. But I hope there's somebody here who can help me. There's not really an appropriate forum here for a matlab code. It's about Gaussian Elimination [url]http://img189.imageshack.us/i/50468910.png/[/url] I already have a code that only needs to be modified. [code] clear …

Member Avatar for peter_budo
0
133
Member Avatar for failbot

So, I'm writing an implementation of List in C++ as a programming exercise, so far I have this: [CODE]#include <iostream> #include <algorithm> using namespace std; template <class T> class Link; template <class T> class List_iterator; template <class T> class List { public: typedef List_iterator<T> iterator; List(); List(const List<T> & l); …

Member Avatar for failbot
0
350
Member Avatar for se00an

Hello all, Inverting an upper (or lower) triangular matrix is a trivial algorithm, due to the nature of the matrix. I am having an issue getting a part of my upper-triangular matrix inversion function to work, and I would like to get it working soon for a personal project. From …

Member Avatar for se00an
1
2K
Member Avatar for negneg

Can any one help me to run this program? I am trying to modify it for multiple linear regression and use Gaussian elimination to solve the matrix.I found this in a book but it is not working:(Does anyone have anything related?I am a beginner so please something not so complicated …

Member Avatar for Software guy
0
149
Member Avatar for vik.singh

Kindly tell an algorithm to sort a data of 500mb while the memory of the system is just 2 mb. Thanks

Member Avatar for Adak
0
137
Member Avatar for coding101

I need to read a text file and change each character into morse code, then send it to another file. is there an easier way than having 26 different arrays associated to a different letter?

Member Avatar for Adak
0
90
Member Avatar for lse123

In Distance Vector Algorithm (RIP) A row in routing table is itself a Distance vector, well, how large this Distance vector can be? As it’s direct links (neighbors=subnets) [B]only[/B]?

Member Avatar for lse123
0
93
Member Avatar for JudeV

The game will have the computer generate a secret random number in the range of 1 to 100. The user will then have six tries to guess the secret number. After each guess, the algorithm will tell the user if the guess was too high, too low or was correct. …

Member Avatar for JudeV
0
1K

The End.