Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
~12.2K People Reached
Favorite Tags
Member Avatar for starletcharmed

Hi, can anyone help me with my code? Im trying to reverse my string using stack... but when it compiles and put in a string and press enter... nothing happens... Any suggestions? [CODE]#include <iostream> #include<stack> #include<string> using namespace std; int main() { stack <string> s; string a; cout << "Enter: …

Member Avatar for d_a_y_o
2
4K
Member Avatar for gregorynoob

okay, i don't have a problem coding the game... that part would be easy. but the problem is to output the lease number of rotations needed to complete the game, so for example... 123 => 413 456 => 526 789 => 789 (rotation of the top left corner) that's what …

Member Avatar for frogboy77
0
162
Member Avatar for DemonGal711

Okay, I'm making a program that will let you traverse a maze where the beginning is the top right corner (coming from the right) and it ends in the bottom left corner (going to the right). We have a 2D array for the board and are using a stack to …

Member Avatar for stilllearning
0
124
Member Avatar for Code Shark

[CODE]#include <iostream> #include<string> int main() { for(int i = 0; i <= 10; ++i) { std::string triangle(i, '*'); std::cout << triangle << std::endl; } for(;;) std::cin.get(); return 0; } [/CODE] As title says is this code ok or should i do it another way?

Member Avatar for gregorynoob
0
112
Member Avatar for DaJoker

I have a program and I want to know how would I put test cases on this program. its an sum and average program and so I'm trying to figure out how test it. I don't want the answer to my program but i want to see how a test …

Member Avatar for dickersonka
0
110
Member Avatar for cicigirl04

Trying to make a program that where user inputs 10 numbers (no negative numbers) and then displays the sum and average. I get a error if I don't have ; after else statement, before sum = 0. I get a warning of coversion from int to float, and warning of …

Member Avatar for DaJoker
0
271
Member Avatar for gregorynoob

heya... ok, so i was browsing the net to find out if there's a good text on this algorithm, but i don't seem to be able to find one. people are obviously using it, but, hey, there's no info on it. the part i get is the theory on how …

Member Avatar for Lerner
0
181
Member Avatar for gregorynoob

okay, so i came up with this idea of making a program to evaluate my code. it's supposed to take the code, compile it, run it on several test cases (given in one file each) and report how the code did (which test cases it passed, which cases it failed...) …

Member Avatar for Salem
0
231
Member Avatar for gregorynoob

okay...i've got another wired counting problem, this time it's about rectangles! gotta find the minimum number of lines to divide a rectangle into squares! i went for...ehh well a dumb idea of cutting the max square off, and cutting the little ones recursively, but... doesn't always work. you're given the …

Member Avatar for dmanw100
0
146
Member Avatar for wqzerboom

The requirements are actually simple, just asking to sort a few, say 10, 20 or so, intergers in ascending order. However, array and pointers are not allowed to be used, and just the fundamental knowledge about flow control are permitted. The hints are as follows: 1. Initialize a variable F …

Member Avatar for rhoit
0
182
Member Avatar for rhoit

I create the simple template structure like this [CODE] #include <iostream> template <class info> struct box { info data; }; int main() { box<int> b1; b1.data = 1; std::cout<<b1.data; return 0;typedef box square; } [/CODE] Now i want to use the typedef for this template structure. I could not figure …

Member Avatar for rhoit
0
2K
Member Avatar for gregorynoob

okay, this is the problem (variation of the knapsack coins problem): you've got 4 coin types: 1 cent, 2 cents, 5 cents and a quarter...infinite amount of each. I'm supposed to find the number of ways in which the coins can be arranged to form the sum of some integer …

Member Avatar for VernonDozier
0
360
Member Avatar for acoxia

Hello i have a project to write a program that takes 2 binomials from a text file then factor them and output it into another text file. I'm curious on how to begin going about this do i take the 2 binomials such as (x+5)(x+9) and put them in a …

Member Avatar for acoxia
0
146
Member Avatar for cuthien

I get the right input, but its giving out the numbers unformatted in the output ie: when it should be input: 3 5 (7) $58 3,400 output: 3 5 -7 58 3400 it gives me 3 5 -7 5 8 3 4 0 0 [code] inFile.get(aa); while( ! inFile.eof()) { …

Member Avatar for gregorynoob
1
92
Member Avatar for tones1986

Hey All - i am currently working on an assignment for a computer science programming class. I have to find and print all the prime numbers from 2 to N (N being a number read in from file). I have some code but i do can not get my mind …

Member Avatar for skatamatic
0
411
Member Avatar for gregorynoob

every time i make my own rounding routine with precision, i see my compiler suggesting a function long double round(long double x, int precision); so i was wondering if someone knows what library it comes from, i surely wasn't able to find it... thanks

Member Avatar for ArkM
0
167
Member Avatar for FumarMata

Hello I have written my program and right now I am stuck in something that I thought that was going to be easy. I have the [B]char buffer[/B], which receives from the serial port some letters and 2 numbers at position 3, lenght 2. I want to extract those numbers …

Member Avatar for FumarMata
0
166
Member Avatar for gregorynoob

i got myself a big pile of components yesterday, an amd dual core procesor, a new motherboard (biostar ta770 a2+) and a new graphics card, nvidia(club3d geforce 9600gt overlocked). so now i've put it all together, the computer starts normally but i don't get any output on my monitor, the …

Member Avatar for zeroth
0
78
Member Avatar for gregorynoob

ok, so this is my problem... i have an array of items, which i want to sum to x or above in a most efficient way... is there a way for doing this? cause all the values are 64 bit ints. i tried recursion but it's slow cause i can …

Member Avatar for VernonDozier
0
179
Member Avatar for gregorynoob

given two arrays of n numbers, a[] and b[], and a number c, find the largest sum of elements from a[] so the sum of same-indexed elements from b[] don't go over c... i really have no idea... only recursion works but too slow :( heeeeelp!

Member Avatar for gregorynoob
0
83
Member Avatar for gregorynoob

could someone please tell me if there are local stores in NY where i can get this calculator? if there are can i please have the adress or something? thanks.

0
39
Member Avatar for gregorynoob

okay, so i gotta make a good enough hash function that should be able to make me a key for out of two integers ( -1000000 <= x, y <= 1000000 ), and should work...well atleast 80% of the time so i could store these in an one-dimensional array... i've …

Member Avatar for gregorynoob
0
90
Member Avatar for gregorynoob

okay so i've got n and an array of n numbers, i have to go through all the three's of numbers like a[i], a[j], a[k] so that i < j < k and take the maximum of each such numbers (max of a[i], a[j], a[k]). my first guess is three …

Member Avatar for gregorynoob
0
166
Member Avatar for disturbedfan

Ok so ive strted to try and teach myself C++ cause in a few years when i go to college i wanna study computer science or engineering. I downloaded Dev C+++ and followed some small simple tuts on how to do C++. 2 of the tuts started off simple and …

Member Avatar for gregorynoob
0
136
Member Avatar for gregorynoob

the problem is to find the minimum numbers to be popped from an array to make it sorted. so for example 12534756, you can pop all but one, but it's best to pop 5 and 7 cause it's the least needed to make it sorted. I'm having difficulties finding a …

Member Avatar for ArkM
0
101
Member Avatar for THAPELO

Suppose we have to write a program where a mark out of 60 is entered and then the corresponding symbol has to be displayed. A message indicating whether the person has passed or not, should also be displayed. We decide to write the program in three steps. You should submit …

Member Avatar for Narf!!!
0
102
Member Avatar for jonabie

Hey could someone help me bout my problem.... can someone tell me how to make an asterisk frame using for loop statement in C++ and also 1 thing.... how can i display an input letters into an asterisk... eg.. username: bulbulito password: ********

Member Avatar for jonabie
0
266
Member Avatar for glecymay

hello i hope you can help me :icon_question: i just want to know how to code binary value to decimal value using c++ im willing to wait for your response :) thanks a lot godspeed

Member Avatar for glecymay
0
191
Member Avatar for robertmacedonia

Hello, I was just looking up the threads and I must say I saw a lot of codes with "std::string", "std::cout", etc... I just wanna ask, wouldn't it be better if you just wrote "using namespace std" instead ? I am doing it all the time, but if it's wrong …

Member Avatar for William Hemsworth
0
250
Member Avatar for arun_lisieux

Hey ppl, I was browsing thro the topcoder sample problems and came up with this one. Plz suggest some good algorithm for this. Problem Statement Note: Please keep programs under 7000 characters in length. Thank you Class Name: SquareDigits Method Name: smallestResult Parameters: int Returns: int Define the function S(x) …

Member Avatar for arun_lisieux
0
181