Member Avatar
For a homework assignment in my intro to java class I was given the following problem: Write for, do-while, and while statements to compute the following sum and product 1. 1 + 7 + 25 + 79 + .... + (3^20 - 2) 2. 1 x 3 x 9 x …
by Victoria_1 in Software Development ()
Member Avatar
Based on this ideea You just wrote a loop allowing the input of 20 names into a list. Alas, you made an error as you entered name number 17. Redesign your input loop, so you can correct the error easily without having to retype the previous 16 names. I wrote …
by dany12 13 in Software Development ()
Member Avatar
Hi Team, I have a file which contain following data like each line has 5 fields Now using shell script i am trying to extract field 4 based on condition that line start with BKP and contain code 84 and CA or CC code it is printing 0 only . …
by changeworld4u in Software Development ()
Member Avatar
I have just used this code in a project which works perfectly, but I have noticed that the first record is always not displayed. Eg. the SQL query lists 15 results, but the output only displays 14, missing the first record. Any ideas why?
by Enigma360 in Web Development ()
Member Avatar
I'm trying to convert a number from any base between 2-36 to any base between 2-36. I have the conversion to base 10, but I'm having trouble getting it from base 10 to the desired base. Any ideas? I know part of this idea will work, I just can't get …
by Emma_3 in Software Development ()
Member Avatar
How can i write it so that my program only accepts positive integers that are great than or = 0? I want my program to ask "How many devices do you wish to add?" And if a user enters a letter, or anything negative it will ask them to enter …
by mystycs in Software Development ()
Member Avatar
I am getting an error on this code. Is it to do with whats in the while loop? How do i get it working? Basically i want to be able to take in letter or number variables, and each would output something, and if they type exit it breaks out …
by mystycs in Software Development ()
Member Avatar
How can i create a input that only allows the letters a b c d The console will ask to please enter a letter. And they can only enter the letters a b c d. And if they enter it, it says thank you for enter a, or b or …
by mystycs in Software Development ()
Member Avatar
I need to find a digit at a specific postion in a number. Example number 652796, user inputs a 4, "2" is displayed. I have the basis for it, but most of the time, the output is incorrect. Not sure what's wrong.
by Emma_3 in Software Development ()
Member Avatar
I have coded this today and wanted to find all the data inside my database which is start_time and end_time also date which is very easy for me to validate but when it comes to time... its really hard this is what I want to do. 1. check all the …
by joshuajames.delacruz in Web Development ()
Member Avatar
number1 = 0; number2 = 0; while(number1 < 5) number1 ++; number2 += number1; Question#1 : what is the value of number1 when the loop exits? Question#2 : what is the value of number2 when the loop exits? Question#3 : if the statement number1++ is changed to ++number1, what is …
by bEedzay in Software Development ()
Member Avatar
Hello, I'm using the DX Studio engine (used to develop 3d games/applications), which uses javaScript as the main language. Since the engine is not getting much attention, their forum is almost completely dead. So I thought maybe one of you here at daniWeb could help me out? When previewing my …
by Christoffer_S in Web Development ()
Member Avatar
I have a query that used union all.. and produces a table like this: now i made a while loop to get the data under the warning column: but now then it only gives me the result of case M, its not looping back to check the other type to …
by Kewne in Databases ()
Member Avatar
Hi every body.i want to make a factorial program with do while loop in the easiest way without using 'for' loop but i cant do that.please help me out!
by ali.mokhtari.560 in Software Development ()
Member Avatar
<?php $dbc=mysqli_connect('localhost','root','','sam_telephone'); $query="SELECT * FROM master_name"; $result= mysqli_query($dbc,$query); $display=mysqli_fetch_array($result); echo $display['f_name']; /// its show me the result which is fine // but when i apply while loop it does not show any thing. while($y = mysqli_fetch_array($result)){ echo $y['f_name']; } // $y['f_name'] should give me a result becuase it showing me …
by arifkutty in Web Development ()
Member Avatar
Evening Sirs, I got some problems in PHP when using while loop in tables. My problem is that I can't make the rows be the same width. This is my preview: I want the blue part of the table, to be equal width with every relative white part. And the …
by tibor.marias in Web Development ()
Member Avatar
Hi Everyone... I have been digging around the web for the last two days trying to fix this problem myself, but have come to the realization that I need some help. I have a mysql query that selects all country names from my country db, (works as described) I then …
by everton.retweets in Web Development ()
Member Avatar
I am having trouble getting started with my program. I have writen the array but I am having trouble starting the if statemnent to fill the seats in the program. If they press 1 it needs to fill seats 1 through 5 if they press 2 it needs to fill …
by jshlmnc in Software Development ()
Member Avatar
Hi everyone! So, I hereby hope to show that I've made progress in coding java (largely due to the help of this great community). I want to thank everyone for dealing with me (especially James). :) The goal: The code below is supposed to seed a layout of boats into …
by Pobunjenik 27 in Software Development ()
Member Avatar
Hi everyone I'm studying the part about while-statement but I don't understand the explanation in the book really well and the example doesn't work for me so I can't see it with my own eyes how it works. Can someone explain what the while-statement means and does? Also can you …
by Kareem Klas in Software Development ()
Member Avatar
hello everyone i am getting problem while configuring ntp server in rhel6 when i write nptq -p output:- no association id's returned what should i do
by rahul pareek in Linux and Unix ()
Member Avatar
This is my code for a guess the number game I'm making. I'd just been working on the confirmGameMode function and was testing it when I came up with some strange output: You have chosen mode the second: Guessing game with addition and subtraction. Continue? <y/n> y Ok! Please make …
by Aethir in Software Development ()
Member Avatar
I have a void function that takes data from an ifstream, reads the first value, (which is an ID #), and compares that value against the ID# info from an array of records. If it's invalid, the rest of the line is ignored. If it's valid, it adds the hours …
by robert.speciale in Software Development ()
Member Avatar
Hello, I am new to C++ and I was trying to write a simple calculator program that has a do-while loop and also includes a series of != statements. Even though I make the statements with all the appropriate keystrokes it keeps giving me my invalid sign statement. Also, I …
by gobiking in Software Development ()
Member Avatar
i have problem about while loop. this my code, i have a table, the name is tab, i have, 3 field, ID, STRING, DATA, and 2 content. this script to change the order in the data field into JJJJ to the position in the string field that has the number …
by ivanichi in Web Development ()
Member Avatar
Is there a reason why this won't take aciton or submit. I don't get any movement on the browser. Neither of the forms move.
by wolfgangcs in Web Development ()
Member Avatar
Help me look at the codes below. It has T_IF error and T_WHILE error. The errors are on line 7 and line 18. I hope anyone can teach me to repair it and the code function is still same.
by yap.junjie.7 in Web Development ()
Member Avatar
I'm making a calculator that performs operations sequentially (from left to right, not precedence), using ASP.NET/C#, but I'm having trouble trying to get the loops going through the input box string in my code behind. Obviously to me the logic seems to make sense, but for some reason, I get …
by jess64k in Software Development ()
Member Avatar
My while keeps looping and i dont know why: code
by CreatorZeus in Web Development ()
Member Avatar
I'm wanting to create a while loop that asks the user if he wants to run the program or not... very basic... I know. I was wanting the prompt to ask the user to input "Y" or "y" to have the program run. Like this: But it sends me an …
by kadowling in Software Development ()