213 Topics

Member Avatar for
Member Avatar for ayoob22

without nested loops i need a program that prints the set of numbers between any two numbers ??? help me plz

Member Avatar for DavidB
0
230
Member Avatar for Kosamov

Hi Everyone, I've been working on creating this code for a project I've been working on but I can't seem to get it to work. I'm creating a service class that I can then pass to a client class that will read a list of cities that ends in a …

Member Avatar for abhi_d_one
0
171
Member Avatar for Kosamov

Hi Everyone, I've been working on creating this code for a project I've been working on but I can't seem to get it to work. I'm creating a service class that I can then pass to a client class that will read a list of cities that ends in a …

Member Avatar for Kosamov
0
158
Member Avatar for ahmed.m.alshammari

Write a C++ program that reads two numbers at a time representing the diameter and its frequency. Then calculate and print the mean diameter.Use a for loop.

Member Avatar for <M/>
0
92
Member Avatar for Helianthus

Ok, so I am working on the hangman game for a school assignment. I have everything doing what I want except for one issue: No matter how many letters are in my word, the number of dashes is always one more than I need. For example: say the word is …

Member Avatar for Helianthus
0
842
Member Avatar for GeneClaude

In this code, I need to put a limitation in every part where the user is asked to input data. The user will be asked to input a grade ranging from 50-100, and if his input is not in the range, the program will display a warning, and if the …

Member Avatar for CGSMCMLXXV
0
238
Member Avatar for padton

Hi all, I am trying to rewrite the following code, to avoid having to write 60 individual loops,I would really appreciate your help with this. # Long Version - not ideal num = 60 n = [open('n%i.txt' % i, "w") for i in range (num)] for a2s1, a2s0, a1s1, a1s0 …

Member Avatar for TrustyTony
0
173
Member Avatar for k2k

Today I have finally made up my mind to quit bat scripting and go for powershell... I need to do a quick script bascially trying to looping through a command output.. can anyone shed some light? i tried foreach ($col in 'app-command -argument') { echo $col } well, guess my …

0
171
Member Avatar for Pobunjenik

This is based on John Conways Game of Life, a simple yet awesome code that simulates life. Rules are simple, if a cell has less then 1 or more then 4 living cells next to it, the cell dies. An empty cell with exactly 3 living cells next to it …

Member Avatar for Pobunjenik
0
328
Member Avatar for timon.bijl

Hello in this code i'm like counting the interest of the start capital and doing this untill the start capital is as much worth as its double but now beside of that i'd like to count with a for next the years so like start capital 100 interest 5 year …

Member Avatar for adam_k
0
85
Member Avatar for cynfudi

the value of length is seven, word in file is hello, chosen_letter can be any that user guesses. chosen_letter is char ofcourse. my problem is when we type in character 'l' for chosen_letter and it only counts it once. also, the if-loop in the second while loop doesnt work. please …

Member Avatar for cynfudi
0
130
Member Avatar for jalpesh_007

I have stuck with one problem. I have created my own program that will work. In program there are two for loop. Now my problem is for(int i=0;i<q;i++) { for(int r=0;r<q;r++) { /*perform some kind of operations returns one integer value.*/ /*here q=4 so first time r loop execute 4 …

Member Avatar for jalpesh_007
0
181
Member Avatar for tapuwa2002

Been trying to loop through worksheets in an excel document. And remove "," in columns. Then save result in same excel document. <?php include'../Classes/PHPExcel.php'; include'../Classes/PHPExcel/IOFactory.php'; $objReader = PHPExcel_IOFactory::createReader('Excel2007'); $objReader->setReadDataOnly(false); //$xlsxfiles=$_SESSION['file']; //echo $xlsxfiles; $objPHPExcel = $objReader->load('../upload/Test_0.xlsx'); $num=$objPHPExcel->getSheetCount() ; $sheetnames=$objPHPExcel->getSheetNames() ; $objWorksheet = $objPHPExcel->getActiveSheet(); $highestRow = $objWorksheet->getHighestRow(); $sheetnum=$num-1; for($sl=0;$sl<$sheetnum;$sl++) { for($cl=0;$cl<$highestRow;$cl++){ $clean= …

Member Avatar for LastMitch
0
4K
Member Avatar for hdeo1235

hey guys! i have a problem, for my GCSE i have been given the task of making a prixe draw program, which allows the user to add 10 names then select a name at random. i have come to a problem when i have tried using a for loops to …

Member Avatar for Reverend Jim
0
268
Member Avatar for Delightfully

def exponents(num1,num2): if (num2==0): return 1 else: return num1*exponents(num1,num2-1) Hey I was wondering how I can generate a list of exponents using a for loop or a while loop so that the numbers display like this: Input (2,3) Output 2,4,8 What I have so far only returns the answer, Please …

Member Avatar for TrustyTony
0
2K
Member Avatar for yigit.hatipoglu

Hi everybody, I really tried to do my assignment but I am lost . Any helping is very helpful , Thanks Write a program that will generate a set of 50 random integers in the range -20 to + 20. The program should display the following: a) The number of …

Member Avatar for nmaillet
0
193
Member Avatar for Helianthus

I have been struggling with this for 4 days - Please help. I have attached a copy of my code with the hope that someone here can give me some insight as to what I am missing. (This is a homework assignment, so please keep that in mind. I am …

Member Avatar for AndreRet
1
342
Member Avatar for JonasBruunJacobsen

Hi Daniweb! I'm going nuts here, this is my first IT problem I as a softwaredeveloper hasn't been able to solve myself... I'm just not that much hardware guy as I wanted to really be I guess.. :( *I have written a short synopsis of my problem, since my post …

Member Avatar for FzFx
0
2K
Member Avatar for athulram

Hey all. I have this program where I need a variable number of for loops. For eg. the program i use to find the pythogorean triplets is for n1 in range(100): for n2 in range(100): for n3 in range(100): if n1**2+n2**2 == n3**2: print str(n1**2) + '+' + str(n2**2) + …

Member Avatar for athulram
0
4K
Member Avatar for dasdsaasd
Member Avatar for dmose13

So I'm just getting started in C++ and need some help. I want to right a program that inputs a number as n and then outputs digits 0-9 based on n. Also each row adds one more number until the last number is the number of digits of n. For …

Member Avatar for dmose13
0
136
Member Avatar for emokidzz

I get an infinite loop when i input 1 and 5 in this program. Please help me detect the error. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Graphs { class Program { static void Main(string[] args) { string[] cities = new string[10] { "Makati City", "Taguig City", "Imus …

0
185
Member Avatar for TheQuestor

I am trying to read through a text file and pull out bits of information I need. I have it 1/2 working but need to figure out how to loop through it to get the other 1/2 Sample log file '-------------------------------------------------------------------------------------------------------------- [01:32:18.281] [@Flos'tok] [@Flos'tok] [Force Valor {875503313485824}] [ApplyEffect {836045448945477}: Force …

Member Avatar for Reverend Jim
0
154
Member Avatar for tmunyemana

Hello, Would you please help me? my code is not executing loop to allow user to play again after user cin>> yes. also the code suppose to allow user 10 tries to guess the number then stop, I am using this code if ((i = 10) && (userGuess != RANDOM_NUMBER)){ …

Member Avatar for WaltP
0
2K
Member Avatar for doomsday1216

I don't know if this is the right place for a post about Scheme, but i was wondering if anyone knew if there are loops and if statements in Scheme? (I am very new to Scheme, i know there are 'cond' statements, but i don't know if there are if's, …

Member Avatar for sepp2k
0
360
Member Avatar for rotten69

Hi there, I was wondering what the string.split() does. And another question is that I want to loop through the class like Math and find out what functions are defined in it.But, I was not too sure how to that. I tried a couple of things but they unfortunately didn't …

Member Avatar for rotten69
0
216
Member Avatar for FUTURECompEng

The output of the following line of code is: Not Done End boolean notDone = false; if (notDone = true) System.out.print("Not "); if( notDone = false) System.out.print("Done "); System.out.println("End"); The answer is false but I am having a hard time understanding why. Aren't the if statements setting notDone equal to …

Member Avatar for FUTURECompEng
0
264
Member Avatar for FUTURECompEng

I am trying to create a Collection class to deal with getting the data of (the amount of male and female names used from the past 130 years(all separate files)) loaded. I know that I need to implement a read(String filename) method in Collection that reads the given file, looks …

Member Avatar for FUTURECompEng
0
2K
Member Avatar for Hydrokr0n1k

ok Ihave developed some code that i am having trouble with how I would I call teh text in the last functions to come into it the part labled 10 and then finally how would I incorperate the 3 parts to work on the first part of the function. the …

Member Avatar for thines01
0
148
Member Avatar for Hydrokr0n1k

OK I have made everything but the last loops needed to complete the project below how would I design the last triangle? // INCLUDE FILES #include <iostream> using namespace std; int main() { int no_lines, // height of triangle. width; // width of rectangle. short choice; // ADDITIONAL VARIABLES // …

Member Avatar for ObjectOriented
0
2K

The End.