3,815 Topics

Member Avatar for
Member Avatar for glao

Hello , I want to scan each row and find in each column the max element and the corresponding index. Then , swap this column with the column which belongs to the main diagonal ( if a condition is valid ). Finally , do the same for the rest rows. …

Member Avatar for glao
0
210
Member Avatar for PulsarScript
Member Avatar for humorousone

This one's a strange question. But first, a little bit of context, a math problem that a teacher asked: > In a given range, how many 4 digit numbers are there, where the 'thousands' digit is equal to the sum of the other 3 digits? I wrote a quick (to …

Member Avatar for ddanbe
0
203
Member Avatar for coolb8888
0
92
Member Avatar for chahinez.abdelo.9

Hello, i hope that someone can take the time to help in this. Here exactly what i should exactly do: - Established the corpus. - Prepare our project structure. - Write a Perl script that : 1 Browse the corpus. 2 Cleans files and makes the necessary substitutions SYGMART . …

Member Avatar for chahinez.abdelo.9
0
226
Member Avatar for mtatadotcom

hello friends, may anyone help me with a code in c for the mechanism of using an atm machine, conditions 1.acc balance starts at zero 2.do not use global variables 3.loop the main menu after every transaction until user presses exit 4.after every transaction user returns to the main menu. …

Member Avatar for chandrasekhar77
0
6K
Member Avatar for Luisa_1

#include <iostream> using namespace std; double polynome3(double a0,double a1,double a2, double a3) ` double y[21]; double z[21]; for (int k=0;k<21;k++) { y[0]=1; y[1]=1; y[2]=1; /* Bernoulli's algorithm */ y[k+3]=-(((a1*y[k+2])+(a2*y[k+1])+(a3*y[k]))/a0); // cout<<y[10]/y[9]<<endl; } double alpha1=y[20]/y[19]; cout<< "The first solution is alpha1 = " << alpha1<<endl; double b0=a0; double b1=a1+alpha1*b0; double b2=-(a3/alpha1); …

Member Avatar for StuXYZ
0
2K
Member Avatar for Transcendent

This what I'm trying to do: Type two or more lines of text into a file. Write a program to open the file, reading each word into a vector<string> object. Iterate over the vector, displaying it to cout. That done, sort the words using the sort() generic algorithm But I'm …

Member Avatar for Lerner
0
292
Member Avatar for Petr_1

Hi, I would be very glad if someone can help me with algorithm to solve following task. We have a convoy of cars that are lined up in a row and must cross the bridge. Cars can't overtake each other. The bridge has limited capacity, which may not be exceeded. …

Member Avatar for rubberman
0
160
Member Avatar for kazkuzzer007

excuse me, I want to make an application 8 puzzle with a algorithm such as the following video http://www.yourepeat.com/watch/?v=LkRuKHwElbk is there anything that can teach me?

Member Avatar for kazkuzzer007
0
2K
Member Avatar for akam aziz

1. N-queen problem The n queens puzzle is the problem of placing n chess queens on an n×n chessboard so that no two queens threaten each other. Thus, a solution requires that no two queens share the same row, column, or diagonal. Solutions exist for all natural numbers n with …

Member Avatar for JamesCherrill
0
328
Member Avatar for Dani

I'm thinking of going down the route where members can actually get paid to answer questions. Here's how I am thinking the concept might work, and you tell me if you think it makes sense: Currently, when you create a new thread, you can donate $1 to have the article …

Member Avatar for Dani
0
2K
Member Avatar for jalpesh_007

Hello, I am working on project of developing video stagenograhy. i have referred following link. http://www.dreamincode.net/forums/topic/269189-video-steganography/ also read a lots of material on it and found total 10 encoding and decoding algorithm. please send/suggest me good material for video steganography. Just let me know how can encode/decode my message using …

Member Avatar for rubberman
0
157
Member Avatar for Echo89

Hi, I wrote this implementation of Sieve of Eratosthenes, is there any way I could eek some more performance out of it. As in opitmising data types, calculations etc. #include <iostream> // cout #include <math.h> // sqrt #include <time.h> // clock/CLOCKS_PER_SEC #include <stdlib.h> // malloc/free using namespace std; int main(int …

Member Avatar for Moschops
0
177
Member Avatar for Lilgenski16

//BlackJack // Plays a simple version of the casino style game of blackjack; 1 - 7 players #include <iostream> #include <string> #include <vector> #include <algorithm> #include <ctime> using namespace std; class Card { public: enum rank {ACE = 1, TWO , THREE , FOUR , FIVE , SIX , SEVEN …

Member Avatar for マーズ maazu
0
2K
Member Avatar for necrovore

I am trying to find out the bounding box of a bezier curve. I know that it can be done by getting all the points using de Casteljau's algorithm and then finding the minimum reactangle around the curve. But de Casteljau's algorithm will make my application too expensive, i feel. …

Member Avatar for ddanbe
0
240
Member Avatar for Roger_2

hello everyone! my program is nearing completion and is due tommrow. However i have identified the source of an issue. i am cycling through a few functions which roll a dice 1-6 and add that result to a buffer to keep score.Then when i want to print, i am only …

0
110
Member Avatar for asif49

Example of problem: Pattern one is: 1, 10, 1: 1 Pattern two is: 10, 10, 10: 0 From this extremely simple pattern we will know that a small value followed by a large increase and then a large decrease means it is a 1. Otherwise its a 0. Using something …

Member Avatar for mike_2000_17
0
319
Member Avatar for Deepesh_1

Dear all, If i have a vector inside a vector creating a matrix, how do I delete a specific column in that matrix. I have already populated the 2d vector now i need a method to delete a specific column in that vector, for example my vector would look like: …

Member Avatar for Maritimo
0
2K
Member Avatar for Roger_2

I have tried with the algorithm below but it does not generate the results i am looking for and i am a bit stumped. I have tried swapping the elements in the array, unless you know there is a less trouble sum alternative example: 1,2,3,4,5 becomes 5,4,3,2,1. i have searched …

Member Avatar for nullptr
0
1K
Member Avatar for infiniteloop56

Hi guys, I have some what of a quick/dumb question. How would one traverse a binary search tree using a loop instead of recursion (An algorithm would be vwry useful if possible)? I appreciate any help . Thanks

Member Avatar for JamesCherrill
0
5K
Member Avatar for david.nicely.393

i have my algorithm but i can't get the flowchart to come out. Main() Declare Sticker_Price as Real Declare Discount_Percent as Real Declare Tax_Percent as Real Declare Tag_Color as Character Declare Answer as Character Declare Final_Price as Real Set Tax_ Percent = 0.07 Final_Price = 0.00 Repeat Process Get_Price(Sticker_Price) Process …

Member Avatar for patrick.sylvester.90
0
155
Member Avatar for PornimaKolte
Member Avatar for necrovore
0
93
Member Avatar for batoolhussain

hi all .I am trying to detect the edge using canny edge detection algorithm, I convert the image to gray and remove the noise and passing the sobel filter. but when I arrive to apply Non-maximum suppression, I didn't know how do it. please help me. I use vb.net 2010.

Member Avatar for batoolhussain
0
853
Member Avatar for arashe

I need an algorithm that check some arrays and if the condition was true * all of them at -1 // Otello.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; static int bazi[8][8] = { 0 }; int turn = 1; …

Member Avatar for arashe
0
151
Member Avatar for chumli

Ok so I completed my hangman code but now I have to read the words from a .txt. I have looked at numerous codes and examples but cant get it to work at all. Any help I would be grateful. #include <iostream> #include <string> #include <vector> #include <algorithm> #include <ctime> …

Member Avatar for chumli
0
147
Member Avatar for fanabanana

hi i am tryin to create an academic schedule were i would enter some data to create it. The algorithm has to have a basic structure were i can put the names of the proffesor, the names of the subjects and some other information. If you can tell me how …

Member Avatar for rubberman
0
164
Member Avatar for Lilgenski16

//BlackJack // Plays a simple version of the casino style game of blackjack; 1 - 7 players #include <iostream> #include <string> #include <vector> #include <algorithm> #include <ctime> using namespace std; class Card { public: enum rank {ACE = 1, TWO , THREE , FOUR , FIVE , SIX , SEVEN …

Member Avatar for Lilgenski16
0
235
Member Avatar for Auroch

Hello. I need to write a program to evaluate a definite integral with Simpson's composite rule. 1. ![fb9ac9a01f247c8a0ed8a606b7c10f4a](/attachments/small/4/fb9ac9a01f247c8a0ed8a606b7c10f4a.png "align-left") I know there is a Simpson's rule available in Scipy, but I really need to write it by the following scheme. 2. ![239643044a08379e5fe3747e13b2834e](/attachments/small/4/239643044a08379e5fe3747e13b2834e.png "align-left") , where a, b - limits of …

Member Avatar for Auroch
0
2K
Member Avatar for Lilgenski16

//BlackJack // Plays a simple version of the casino style game of blackjack; 1 - 7 players #include <iostream> #include <string> #include <vector> #include <algorithm> #include <ctime> using namespace std; class Card { public: enum rank {ACE = 1, TWO , THREE , FOUR , FIVE , SIX , SEVEN …

Member Avatar for Lilgenski16
0
242
Member Avatar for Lilgenski16

199 C:\Users\Gaming-PC\Desktop\C++ Files\Tic-Tac-Toe.cpp expected unqualified-id before "if" {//Tic Tac Toe //Plays the game of tic tac toe agaienst a human opponent #include <cstdlib> #include <iostream> #include <string> #include <vector> #include<algorithm> using namespace std; //global constants const char X = 'X'; const char O = 'O'; const char EMPTY = ' …

Member Avatar for NathanOliver
0
270
Member Avatar for brita811

Google announced that they have started prioritizing sites offering HTTPS (HTTP over TLS) in their page ranking algorithm; Lets see how it reflects.

Member Avatar for John_82
-1
96
Member Avatar for david.nicely.393

• Need help with writing an algorithm: • Department Store Sale! Prompt the user to enter the sticker price of each of the clothing items they’re purchasing (make sure all input prices are positive). The user should be allowed to purchase as many items as he or she would like. …

Member Avatar for sneekula
0
142
Member Avatar for saeed.albahri1

Hello C++ Nerds! I am creating a list using Arrays. And I want to have AddItem, DeleteItem functions in those lists. But as you know, you can't delete an element from an Array because it's a fixed size. But we can shift all the left elements by one place and …

Member Avatar for Maritimo
0
335
Member Avatar for david.nicely.393

Need help with writing an algorithm: Department Store Sale! Prompt the user to enter the sticker price of each of the clothing items they’re purchasing (make sure all input prices are positive). The user should be allowed to purchase as many items as he or she would like. For each …

Member Avatar for sneekula
0
136
Member Avatar for melusi_1
Member Avatar for Moschops
0
135
Member Avatar for Diellza

Dear all, I have created a code for QuicSort algorithm with random numbers and time executation but now I want to do for Countin sort And I don't know, Can anybady help me based in this example. Thanks include <iostream> include <conio.h> include <time.h> include <stdlib.h> //srand and rand functions …

Member Avatar for David_50
0
701
Member Avatar for Diellza

How to make the code with Random numbers and Time Executation? #include <iostream> /* cout */ #include <cstdlib> /* srand, rand */ #include <ctime> /* time() */ #include <list> /* list */ #define BASE 10 // # of buckets to use #define ARRAY_SIZE 50 // max # of elements in …

Member Avatar for Diellza
0
617
Member Avatar for divinity02

write a algorithm in pseudocode for the procedure: input a person's age and salary. If the age is over 32, then add $1000 to the salary but otherwise subtract $500 from the salary. Finally, output the age and new salary: this is the question: here is the answer well the …

Member Avatar for divinity02
0
209
Member Avatar for Ankita_5

//Program to implement Basic Incremental Algorithm //Working on ubuntu #include <GL/glut.h> #include<stdlib.h> #include <stdio.h> GLfloat x0,x1,y0,y1; //Input variables taken as global int flag=1; //variable for display1() void init(void) { glClearColor(0.0,0.0,0.0,0.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.0,500.0,0.0,500.0); } void PutPixel(GLfloat x,GLfloat y) { glBegin(GL_POINTS); glVertex2f(x,y); //To display pixels on-screen glEnd(); glFlush(); } void display1(void) …

Member Avatar for rubberman
0
250
Member Avatar for alexamicaa

I have no idea how to write in Python. Please help me with this! Best answer if you write the program! Central Limit Theorem I Goal Write a python program that will use your accept / reject Monte Carlo algorithm to demonstrate the central limit theorem. Recall: The central limit …

Member Avatar for sneekula
-3
496
Member Avatar for rehpolin
Member Avatar for Cesar_3
0
51
Member Avatar for Rokas.Rud

Hello. So I wrote A-star pathing algorith. It is working fine, however it is to slow, if distance between start and finish is big. This "big" isn't really that big. It may take even 30seconds in 11x11 grid... I am looking for some optimization ideas of proffesionals here. Code: <?php …

Member Avatar for lorenzoDAlipio
0
189
Member Avatar for inspire_all

Hello everyone,i think i know quick sort algorithm.But i need help in figuring out its worst case. Lets look at the below quicksort code----> void quicksort(int arr[],int low,int high) //low and high are pased from main() { int m; if(low<high) { m=partition(arr,low,high); quicksort(arr,low,m-1); quicksort(arr,m+1,high); } } int partition(int arr[],int low,int …

0
136
Member Avatar for Nandomo

So I have the following. peer1 netblock 64.96.192.0/24 nexthop 61.40.0.11 AS path 600 3001 6001 5001 4001 i peer2 netblock 64.96.192.0/23 nexthop 61.40.0.12 AS path 600 40000 4001 i With my knowledge I think the algorithm would choose peer2 because it has a shorter AS path, but I want to …

0
146
Member Avatar for Ravi Rajput

Google has updated his dmca algorithm last week. This time google has remove more site from his search engine which was violated google copyright act.

Member Avatar for Kelly Burby
0
141
Member Avatar for Myronz
Member Avatar for danielpeterson
0
394
Member Avatar for budax.bageur2

how to make the simple malware using iteration on dev c++ ?? that using simple algorithm for do, or while do or do while

Member Avatar for NathanOliver
0
218
Member Avatar for teekay309

A certain company wants to improve the rate at which their login system is accessed and you have been tasked to carry out this project. In this project, you will consider the problem of organizing a collection of computer user-ids and passwords. Each time a user logs in to the …

Member Avatar for JamesCherrill
-1
214
Member Avatar for somyms

while mining medical data set privacy is a major concern.i want to mine medical data and preserve privacy.so i need to mine medical data and group them according to diseases so that it can be used for research and publishing without revealing patients information .i planned to use lkc privacy …

0
297

The End.