213 Topics

Member Avatar for
Member Avatar for ChPravin

Hello, I know this question might sound stupid! I am using recursion inside a loop. I want to stop the loop as soon as the method is called recursively and resume it again when the call returns. I am not able to do so. Do I need to lock the …

Member Avatar for jon.kiparsky
0
1K
Member Avatar for poison_bubbles

Hi im zee and i'm new to javascript.. The javascript function below..examines if a string value contains only numbers.. My problem is..I can't figure out why it doesn't continue with the 2nd loop and iterate j..please help.! [CODE]<script language="javascript"> <!-- value = "23e"; isNumber(value); function isNumber(value){ document.write('I'm inside the function …

Member Avatar for james chaco
0
112
Member Avatar for student_

I am trying to make a program which so i can put in orders and have shopping and handling calculated the problem is, each time i run the program there will be a different number of people placing an order, how would i set up a loop that on each …

Member Avatar for vegaseat
0
276
Member Avatar for csha_cs508

our task is to show the histogram in a vertical orientation like this: Sample Input/Output Enter a string: waka waka fifa Histogram for waka waka fifa * * * * * * * * * * * a f i k w I have here my code, but the output …

Member Avatar for jonsca
0
919
Member Avatar for csha_cs508

please help me with this problem... i dont have any idea on how to make the code... Histogram is a process of representing the frequency of data in a chart. Write a C++ program that will simulate this process. Your program should read a string (only letters are allowed) and …

Member Avatar for wisaacs
0
568
Member Avatar for Skyelher

I kinda use this: [CODE]while 1: [body] [/CODE] a lot... But I've also read that it's not a good idea to be doing so even if you put add some way to break from the loop within the body... Any alternatives, please?

Member Avatar for griswolf
0
144
Member Avatar for Nicco

Hey there! I'm new to c++ and programming in general and have a quick question to why the program below works. I had most of it completed but for hours i couldn't figure out why every time i tried to enter input for the "make" member of my dynamic structure …

Member Avatar for Nicco
0
105
Member Avatar for Griff0527

I am trying to edit my current homework assignment to include a loop that lets the user repeat the computation for new values until the user says they want to end the program. I was given a hint to use integer division and the % operator to implement this function. …

Member Avatar for NathanOliver
0
271
Member Avatar for levraheit

the program asks the user to input the number of users who wants to play. i couldn't get the result of players.length individually. each players result should be number of correct answers from the number of questions asked. please help!. [CODE]import java.text.DecimalFormat; import java.util.Random; import javax.swing.*; public class coll { …

Member Avatar for levraheit
0
102
Member Avatar for gkaykck

--Homework-- Write a C program that codes a string which is given by keyboard so that the coded string includes characters with their number of sequential occurrences. For example, if the string to be coded is AAABBFFFRRRRZTT then the coded string must be A3B2F3R4Z1T2. You can assume that there is …

Member Avatar for gkaykck
0
196
Member Avatar for mick3339

I am trying to read a csv file and store it into a 2D array, However it give me "segmentation fault" each time I run it. Here is my code [CODE] #include <stdlib.h> int main(void) { const char filename[] = "a.txt"; FILE *file = fopen(filename, "r"); if ( file != …

Member Avatar for Salem
0
485
Member Avatar for Annettest

Hi everyone: I have written C++ code for populating a matrix/2D array with calculation results. Each column of the array represents results for a distinct time step. My problem arises because the rows of my results vector do NOT correspond to the rows of the matrix. The matrix includes extra …

Member Avatar for Annettest
0
97
Member Avatar for corby

Hey guys/gals i need some help with finding the T(n) complexity of the following for nested loops [CODE] sum = 0 for i = 0 to n-1 do [INDENT]for j = 0 to (i^2) - 1 do[/INDENT] [INDENT][INDENT]for k = 0 to j - 1[/INDENT][/INDENT] [INDENT][INDENT][INDENT]sum = sum + 1[/INDENT][/INDENT][/INDENT] …

Member Avatar for corby
0
105
Member Avatar for camigirl4k3

the program I had looks like this: def wordToNumber(word): if word == "one": return 1 elif word == "two": return 2 elif word == "three": return 3 elif word == "four": return 4 elif word == "five": return 5 elif word == "six": return 6 elif word == "seven": return …

Member Avatar for TrustyTony
0
118
Member Avatar for Griff0527

I'm new to C Programming ( 6th week of an 8 week course ) and I am working on user defined structures. I have created a structure to store data received from a file and three of the four sub functions planned: open the file, store the data in the …

Member Avatar for Griff0527
0
8K
Member Avatar for tjsail

Hey Everyone... Not quite sure how it works on these forums as this is my first post, but I am looking to separate elements of lines printed to a text file in real-time for a log parser. An example of the text output is: [INDENT][CHAT WINDOW TEXT] [Sun Nov 29 …

Member Avatar for rohini.vangury
0
503
Member Avatar for Covert06

Hello, I'm still a huge beginner in C++ and while i spent hours trying to find a solution to this problem i came to this forum pretty often and I thought it'd be a good idea if I try to ask about my problem. (If you notice anything that can …

Member Avatar for Covert06
0
2K
Member Avatar for astronomical

All, Basically what you have here is a PART of my program. Here I am supposed to get the LENGTH of a rectangle from a user and return that length to the main method for further use. My program works fine if I take out the input validation but I …

Member Avatar for javaAddict
0
127
Member Avatar for Exploded Fiber

Hi all, After some time pulling my hair my brain has turned to mush on this senerio. I'd appreciate any help offered as my PHP skills are still limited. Here is the senerio: I am creatings a voting website. I am currently creating an admin page that creates local election. …

Member Avatar for Exploded Fiber
0
104
Member Avatar for needpythonhelp

let's say i have a list of things, like: [bread, cookies, cake, chocolate, bread] how can I make loop that will, in each iteration, create a variable with the name of the item in the list? basically, i want to be able to count the times each item appears in …

Member Avatar for snippsat
0
162
Member Avatar for yassar

I cannot find the mistake in the below code, I receive "statement ignored error" at the last line of the first select clause part of the code:[CODE]SELECT * BULK COLLECT INTO l_employees FROM employees;[/CODE] But I am not sure if thats the real problem. Here is my full code [CODE]declare …

Member Avatar for yassar
0
4K
Member Avatar for php99

Hi, I have made a working program that collects data from a server then puts it into an array. I decided its time to move away from text files and on to XML. [CODE] Dim sr As StreamReader = File.OpenText(frm_Loader.jokes_dic) Dim input As String input = sr.ReadLine() frm_Loader.counter = 0 …

Member Avatar for kvprajapati
0
83
Member Avatar for TommyTran

I have an assignment that asks me to: 1. create a button 2. when that button is clicked, an inputBox will appear to ask the user how many words they will enter. 3. then display an inputBox for each word. For example, when the first inputBox appears, I enter "3" …

Member Avatar for apegram
0
93
Member Avatar for AngryOne

Hello I'm begining to learn Java and I'm trying to convert from a While loop into a for loop. Sadly I'm just not quite grasping it... I understand the loop is here [CODE]while (n * n > Math.pow(2,i)) { i++; } [/CODE] but it's not quite as simple as changing …

Member Avatar for cms271828
0
107
Member Avatar for guffer

i have a program which displays a certain menu, after the menu it askes for the selection from the menu....now when an integer is used it works perfectly. but when you input a character(letter) in the menu it goes into an infinite loop. anything to use to stop this behavior …

Member Avatar for Jiwe
0
135
Member Avatar for gcardonav

Afternoon: I am trying to create a loop to give me a series of random numbers. I need the random numbers to be between 100 and 999, this is necessary so I can divide the numbers by 1000 and then use this numbers for another program. My problem is that …

Member Avatar for mrnutty
0
153
Member Avatar for gcardonav

Hi: I posted yesterday about setting my loop to get random number between the values I desire. Now I got a bit of misunderstanding with my arrays. In the program now I am trying to calculate the average sum of the amount of numbers I get each series. My problem …

Member Avatar for Ancient Dragon
0
182
Member Avatar for ASFtlink

Hello, I need some help on processing only even numbers on a counter-controlled do-while-loop, an event-controlled do-while-loop, and event-controlled do-while-loop to process only even numbers that breaks within the loop. I'm new at C++ so help would be appreciated. Thanks. [CODE] #include <iostream> #include <fstream> #include <string> #include <cstring> #include …

Member Avatar for DemonGal711
0
199
Member Avatar for markrezak

[CODE]ok ok i got it now right i copy it to vector and sort it..... here is the code #include <iostream> #include <fstream> #include <algorithm> #include <string> #include <map> #include <vector> using namespace std; typedef map<string,int> word_count_list; struct val_lessthan : binary_function < pair<string,int>, pair<string,int>, bool > { bool operator() (const …

Member Avatar for markrezak
0
269
Member Avatar for markrezak

ok ok i got it now right i copy it to vector and sort it..... here is the code #include <iostream> #include <fstream> #include <algorithm> #include <string> #include <map> #include <vector> using namespace std; typedef map<string,int> word_count_list; struct val_lessthan : binary_function < pair<string,int>, pair<string,int>, bool > { bool operator() (const …

Member Avatar for William Hemsworth
0
175

The End.