3,815 Topics

Member Avatar for
Member Avatar for monkey0525

My program is a implementation of the Sieve of Eratosthenes algorithm, which finds primes number. It stores two integers up to the maximum, and all odd numbers from 3 upward. It also checks if, for whatever any reason the first number ever reached the square root of the maximum number, …

Member Avatar for sabin_chirila
0
682
Member Avatar for Kontained

I'm in the process of writing a knights tour algorithm for a homework. I believe my algorithm is a good one and don't see anything wrong with it, but for some reason my program keeps throwing a stack overflow error. I don't see any reason why it would be throwing …

Member Avatar for Kontained
0
634
Member Avatar for yoshitsugu

Can anyone fix my problem? I'm sure my getDate function algorithm was right, but it still wrong.. here is the code: [code=c] #include<stdio.h> #include<string.h> #include<stdlib.h> typedef struct{int day,month,year;}Date; typedef struct{ char name[31],gender; Date dob; }Student; void getString(FILE* x,char* y); Date getDate(FILE* x); char readChar(FILE *x); int main(){ Student pupil[100]; int …

Member Avatar for L7Sqr
0
188
Member Avatar for spoonlicker

So I'm working on a game similar to tetris, but I don't know any algorithms or methods to make the blocks go down faster when pressing the down key button.

Member Avatar for ajst
-1
99
Member Avatar for wonder_laptop

i have a project that i want to do and i was wondering if it can be done using Aglets. As i understood from an article about Aglets, we can create many servers by assigning different port numbers to each. but all the servers will the have the SAME ip …

Member Avatar for mKorbel
0
112
Member Avatar for banh

I am trying to come up with the algorithm for my n queens using Simulated Annealing. There is the general algorithm online, but when i look at it, I couldn't understand how it work. My nodes have the number of hits between the queens on chess board. How can I …

Member Avatar for banh
0
194
Member Avatar for lexusdominus

i wrote this a couple of years ago when i was just starting to program. i didnt know any professional programmers and wanted to learn, so just experimented with the language. maybe it will give you an insight into how people program for fun. feel free to add to it, …

Member Avatar for mike_2000_17
0
140
Member Avatar for twsmale

I have been stuck on this problem for a while, and I just can't figure it out. I'm sure there's an incredibly easy way to do it, but I'm at a loss... I need to take in this text file: Smith, M.N., Martin, G., Erdos, P.: paper name Erdos, P., …

Member Avatar for twsmale
0
219
Member Avatar for Sahilroy

Write a program which generates randomly some numbers (integer) say 20 numbers between 1 and 100 and send it to an output file called randOutput.txt. Next your program should open this file (randOutput.txt) and check whether the numbers are ordered either ascending (or descending) or not. So you should have …

Member Avatar for Narue
0
110
Member Avatar for azencot

Hello, I am not sure if this is the place to ask. I develop an algorithm in C++ under Windows XP with Visual studio 2008, the algorithm is proved to be linear ( O(n) ), there is a usage of memory during the algorithm ( all of it is being …

Member Avatar for azencot
0
181
Member Avatar for CrumbledCookies

Okay, so I'm a 7 month experienced programmer in C++, and now is the time when I am having the most trouble. So my Professor wants us to create a program that asks the user to input a sequence of numbers and then convert those numbers into outputs of "how …

Member Avatar for ravenous
0
191
Member Avatar for DARK_BYTE

HI I am currently doing my final year project and I need to build an algorithm visualization tool(with user defined algorithm animation). The user defined animation takes place as follows: 1. The user can open a text editor in the GUI and type his/her user-defined algo in java 2. When …

0
69
Member Avatar for -acir-

[ICODE] here's my code below and i cant seem to find out how to return to public static void main after selecting yes in the dialog box. this cud be a very damn question however i get confuse about how to resolve this. thanks. by the way, this program is …

Member Avatar for -acir-
0
886
Member Avatar for darelet

Hi all, I'm trying to implement a blob coloring/region labeling algorithm to find and label all blobs/objects in a given image so that at the end of it, I can eliminate all but the largest object. I represented the image by a mask matrix (int binary[image size]) where zero co-ordinate …

0
93
Member Avatar for da10x

We're working on a project and we are completely stuck. Basically, we are coding a virtual Quoridor player module. However, our player module thinks that it's starting one square in front of it's home! Why could this be? [CODE]from interface import * import engine import random import time import copy …

Member Avatar for richieking
0
1K
Member Avatar for xcarbonx

Hi..i'm having some trouble coming up with the an algorithm for a problem im working on. I am trying to check an arithmetic infix expression like: (((6+2)/2)*(3-1)); //This is my input file(; marks end of line.) I have to check to see if the statement is ok, or not ok, …

Member Avatar for L7Sqr
0
94
Member Avatar for rbduck09

This is the algorithm that I am working from Algorithm Name: UPDATE_CHECKBOOK [B]Problem Input(s):[/B] start_balance - the beginning checkbook balance. xact_amount - the amount of the transaction. xact_type - the type of the transaction (credit or debit). [B]Problem Output(s)[/B]: new_balance -- the ending checkbook balance. Relevant Formula(s): Adding a credit …

Member Avatar for rbduck09
0
145
Member Avatar for medopunsher

Hello all , Is there an algorithm for computing Very large numbers (Max 9^1000000) without BigNum ??? Thanks in advanced.

Member Avatar for arkoenig
0
109
Member Avatar for andimiami

Hello! I need a little more help. I have managed to convert all my chars input from a text file into digits. Example: Input from file: $1,9,56#%34,9 !4.23#$4,983 Output: 1956 349 423 4983 Now, I need to take those individual digits the 1 9 5 6 and make it read …

Member Avatar for mrnutty
0
209
Member Avatar for Poopster01

If you read the Prologue section of the code I posted it will give you an explanation of what I am trying to accomplish with this program. The problem I am having is that I am unable to find an example of how to pass an argument through the string …

Member Avatar for Akill10
-1
326
Member Avatar for water_ox

I need help with this assignment that I have to do. I am new to C++ programming and I do now know how to start this lab. Here is the instruction to the lab..please help.. COMP-122 Lab 6 Grade Arrays Objectives: • Use an organized, modular approach to develop programs, …

Member Avatar for jonsca
0
223
Member Avatar for strungoutfan78

Hey everyone. I'm brand new to C++ and programming in general and this is my first post here. I've found lots of good info here and these forums helped me a lot last semester. I've got a problem here though. This is a small bit of code I had to …

Member Avatar for strungoutfan78
0
399
Member Avatar for lilsean67

Okay here is go this is my first time posting to this website and I hope I can get this all right for you all. I have stated this program and I gt know errors but the program will not run past my first cin cout statements? Does anyone see …

Member Avatar for lilsean67
0
116
Member Avatar for teppel

Hi all, I kind of new in C++ and my assignment require me to do some encryption on data. Found the AES file online can anyhow guide me how to use it ? Because when i compile the test.cpp it keep giving me exception not match error. And btw how …

Member Avatar for pseudorandom21
0
512
Member Avatar for bensewards

The question is: A file contains a list of names in the form: Jones, Frederick M Brennan, Claire Your program should alphabetize the list. Use the C++ string class. Also, extract names from the input stream with getline(). What i know so far: main() should declare a char array and …

Member Avatar for ravenous
0
202
Member Avatar for TrustyTony

I had posted here already here to forum a [beautiful code for solving Sudoku puzzles](http://www.daniweb.com/software-development/python/code/294304/eleagant-and-fast-sudoku-with-generator-expressions), so I was in kind of dilemma what to do, as I read the task to do a sudoku solve as one task in Project Euler. To use the code from before and just take …

Member Avatar for TrustyTony
0
894
Member Avatar for garu525

Hello, I'm starting to learn Java and this one of my homework but for some reason it won't run. My algorithm is to just add all 1-1000. I highlighted the part that's causing a problem in red. Please help, thanks! [CODE] import java.util.*; public class thousand { static final Scanner …

Member Avatar for garu525
0
160
Member Avatar for eduard77

i have the next code that compiles without problems but when I run it after I put in the input data it gives me the next error: line 128 vector iterator not decrementable I use visual c++ 2010. [CODE] #include <iostream> #include <iomanip> #include <vector> #include <iterator> #include <algorithm> #include …

Member Avatar for mike_2000_17
0
442
Member Avatar for eduard77

The output of the vector that you helped me make is a little hard to read. Can you help me make it a little more readable like: Input: Enter number of different sizes: 5 and the inputs are : 35 x 2.36 23 x 1.23 12 x 4.23 16 x …

Member Avatar for eduard77
0
96
Member Avatar for Howdydoody

1) Write a function that merges two instances of the List ADT using the following specifications: MergeList (List list1, List list2, List& result) • list1 and list2 have been initialized and are sorted using function ComparedTo • result is a sorted list that contains all of the items a. Write …

Member Avatar for ravenous
0
650
Member Avatar for JordanHam

I have read many different threads about how it is not possible to delete values from an array, but I need to find some way to do this. I am making a program that involves a bottom up approach algorithm where it pairs off data segments, finds the best segments …

Member Avatar for Fbody
0
160
Member Avatar for EneilShade

I was humming along, and decided to try out data sorting. So, I did a few pieces of research, and came up with a really cool looking algorithm: Quicksort. I did what I should have, and started to program. Now, here is where I sound like an idiot: Why is …

Member Avatar for EneilShade
0
223
Member Avatar for chaosgeneration

I have an assignment to show a brute force algorithm on combination and permutations. All I am given is the function headers, and I cannot see the main. I'm having trouble understanding how sets work... Here is my header function for combination [code=c++]set< set<char> > powerSet(set<char S>)[/code] now, I'm not …

Member Avatar for pseudorandom21
0
170
Member Avatar for chaosgeneration

Hello, I'm working on a function that is supposed to impose brute force algorithm on a set of chars. Here is what I have so far [CODE]set<string> permutation(set<char>S) { set<string> fun; string myString; do{ for(set<char>::iterator it=S.begin(); it !=S.end(); ++it){ myString += *it; } fun.insert(myString); }while(next_permutation(S.begin(), S.end())); return fun; }[/CODE] due …

0
50
Member Avatar for raschko

Issue involves: python 2.7 pil pyopengl pyside In the midst of developing a small drawing test, I've run into a situation involving line computations. Currently the drawing test works, but only enables singular point drawing at the cursor position. [IMG]http://i246.photobucket.com/albums/gg94/Braschko/Forum%20Posts/Screenshot-1.png[/IMG] I've seen python interpretations of [URL="http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm"]Bresenham's line algorithm[/URL], which works …

Member Avatar for raschko
0
165
Member Avatar for kitty_wave

Hi guys, I am pretty new to java, and I have to write out an algorithm for a few operations following each other. The point I am at, is adding two numbers and then dividing the product. This is the code I have come up with so far, excuse the …

Member Avatar for ztini
0
83
Member Avatar for CharlieNewey

Hi there, I have a set of coordinates (data points) that I want to use Python3 to fit an exponential decay curve to. I've used this resource [URL="http://mathworld.wolfram.com/LeastSquaresFittingExponential.html"]here[/URL] as a base for building my program. The problem is, no matter what the x-value I put in is, the y-value ALWAYS …

Member Avatar for CharlieNewey
0
688
Member Avatar for Prasanna Venkat

Hi friends, I am a final year Mechanical Student and I am doing my Final year project in C++. My project requires some complicated programming in C++.. Here are the details. Initially I need to create a random matrix. The user will give the no of rows and columns. For …

Member Avatar for pseudorandom21
0
186
Member Avatar for IamAuser

Hello All, I am not sure why my algorithm is not working for this problem. I need to store space separated arguments in an array char* argBuffer[], so I can later make some system calls . The problem is that the last argument is writes over all indexes of the …

Member Avatar for IamAuser
0
5K
Member Avatar for eline83

Hello guys. I'm stuck at my algorithm assignment. Here is the problem. We found that the solution to the mergesort recurrence f(n) = f(┏n/2┓) + f(└n/2┘) + n, f(1) = 0 satisfied f(n) = Θ(nlogn). Find an expression for the exact value of f(n). (Hint: generate the first 20 to …

Member Avatar for mike_2000_17
0
109
Member Avatar for newC

Hi. I am new in C programming. I am tasked to complete a program. The hardest part in programming is to understand the logic of a program. Please explain to how and why the algorithm works. I have commented the parts that i need know of/needs help in green. Your …

Member Avatar for chrjs
0
126
Member Avatar for pradeesh.login

define briefly about DTW algorithm for voice recongnition also how to implement java speech api in netbeans????????????????????????????????????

0
54
Member Avatar for KKR_WE_RULE

Well guys.. Here goes my first post here :) I've coded few ECC methods that are very frequently used in Cryptography. I've tested the code with the examples posted in certicom website & it works well. But then I implemented ECDSA_Sign() --> Elliptic Curve Digital Signature Algorithm using my own …

0
184
Member Avatar for DubyStev
Member Avatar for frogboy77
-1
96
Member Avatar for andimiami

Hello... I am still a newbie! I have an assignment to write a C++ program to cover a series of ASCII character digits into numbers. Like if the input (that I have ti input from a saved file) was $1,9,56#%34,9 it would output 1956 349 on two seperate lines ignoring …

Member Avatar for WaltP
0
178
Member Avatar for dstaner

I've been given an assignment as follows and I'm having trouble getting it to work properly, hoping if anyone out there can lend word on how to get it running? "A bank account starts out with $10,000. Interest is compounded monthly at 6% per year (0.5% per month). Every month, …

Member Avatar for happyherbivore
0
748
Member Avatar for angskie20

hello every one..I'm IT student i do understand it's logic and algorithm but I'm having hard time in programming.. I do hve weak foundation in Programming..can i ask help from u for my assignment? Problem: Write a program that reads student scores, gets the best score, and then assigns grades …

Member Avatar for stultuske
0
346
Member Avatar for biancaW

I have this question. could anyone help me how to write C++ code for it: A bank account starts out with $10,000. Interest is compounded monthly at 6% per year (0.5% per month). Every month, $500 is withdrawn to meet college expenses. After how many years is the account depleted? …

Member Avatar for jonsca
0
2K
Member Avatar for Lelly

Hello, How can I do this: Implement the MergeSort algorithm in C++, Generate random numbers into a text file to read as input. The 2 parameters to the program are the input and output text files Thanks

Member Avatar for Lelly
-1
2K
Member Avatar for JamesWoodward

Hey guys, I have been asked to write a program in php which is to play hangman but used in messenger chat. We are using imified to create our "bot". The game to me sounds backwards to normal but here is the deign brief. . In your game of hang-man, …

Member Avatar for Alan.Smith
0
170

The End.