213 Topics

Member Avatar for
Member Avatar for davy_yg

I wrote the following codes: [CODE] <?php $nama = ('a' => 'John', 'b' => 'James', 'c' => 'Ray', 'd' => 'Lime', 'e' => 'Kit') sort $nama reset($nama) $i=1; do { $i++; echo "The key is " . $i . "and the value is “ .$i <br />"; } while ($i<=5); …

Member Avatar for pritaeas
0
84
Member Avatar for Godservant1

Someone gave me this challenge See how large a type is by storing powers of 2 in this list of types: float, double, long double. To determine if a number will fit, start with 1.0, double it, then divide by 2 to see if you get the previous number. For …

Member Avatar for nyquist
0
143
Member Avatar for Prisms

Hey guys I'm new to java and was wondering if I could have a little assistance. I need to have a user input their number of classes, hours for each class and the grade they received after the information is given i need to calculate their GPA. I have gotten …

Member Avatar for Prisms
0
3K
Member Avatar for mhillig1

[B]What I want on the first run thru[/B] is to ask for input, print input, ask for 2nd input, print 2nd input. End the first run, saving inputs to text file. My results are: input 1 input 1 again. input 2 input 2 again. On the 2nd time thru, it …

Member Avatar for JoshuaBurleson
0
1K
Member Avatar for hawx

I have created a recursive function to get parent products of a product. I'm almost sure I'm nearly there, but need help snapping out of recursion. The result I am looking for is something like: Product 1 (id:1, parent:none) --- Product 2 (id:2, parent:1) --- --- Product 3 (id:3, parent:2) …

Member Avatar for Morta
0
109
Member Avatar for miltondollar

import javax.swing.*; public class NestedLoop { public static void main(String args[]) { for(int x=0;x< 5;x++) { for(int y=0;y<=x;y++) { System.out.print("*"); }// end innerloop System.out.println(""); }//end outerloop System.out.println(); }//end main }//end class

Member Avatar for Rameshwar Soni
-1
103
Member Avatar for Who me?

Hi, I am new to PHP and need help with my code to create files and folders based on variable values. Here's the setup: 1. I have approximately 100 categories. I've assigned a variable to each category. E.g. [LIST] [*]Variable 1 (as in $c1) contains category one's name. [*]Variable 2 …

Member Avatar for diafol
0
2K
Member Avatar for CeeGee

Hi all, I am a newbie to C# and need help bad. I am to use looping (do,for, while or any combination).The program will accept a letter 'A' example and then end. What am i doing wrong. Three salespeople work at Sunshine Hot Tubs-Andrea, Brittany, and Eric. Write a program …

Member Avatar for ddanbe
0
1K
Member Avatar for spivey

I need to update database table fields that contain URLs based on evaluation of the those URLs. Specifically, I need to eliminate the empty the fields of any URL that contains the directory "img_ours", and I need to take any URL that contain UPCs and change the URL formula, but …

Member Avatar for rpv_sen
0
143
Member Avatar for king03

Hi there guys I need your help so badly as I can't finish my program. The instructions are: create a console application that instantiates a class with a method that takes in a string of values converts upper case to lower case and vice versa. The method also returns the …

Member Avatar for duke_swh
0
380
Member Avatar for Purkinje

[url=http://www.daniweb.com/software-development/python/threads/375271/1621485#post1621485]Sample code credited to Enalicho[/url] In this example, we count the number of appearances of the number 1 through a range of pages using while loops. First off, notice how easy it is to tell what the variables in this method are doing. I did not write this method, but …

0
183
Member Avatar for J-Dub

I used one action listener for an array of buttons that do different things. Exploring methods. I am fairly new to java. I just made a tic tac toe program. I am hoping for people to look it over and tell me what they think, ways to make it better, …

Member Avatar for peter_budo
0
326
Member Avatar for djjavo

Hi I know there are some posts addressing the same issue but unfortunately I do not understand how to do it and was wondering if someone could help. I would like to cycle through pictureboxes, in this example using the 'n' variable To further explain what I would like to …

Member Avatar for djjavo
0
536
Member Avatar for neely615

First, I apologize for posting this since it seems to have been addressed for every situation except mine (or so I can find), and I admit I am a complete novice. [B]Intro:[/B] I have a batch file which gets placed in a directory with target files, loops through the files …

Member Avatar for griswolf
0
326
Member Avatar for Raim

Basically, I made a small calculator. It does the PEMDAS and factorials. Part of my code is here:[ICODE]#include "stdafx.h" #include "iostream" #include "stdio.h" #include "math.h" using namespace std; short MENU (void); void raiz (void); void suma (void); etc..... [/ICODE] [CODE]int main () { short OPC; OPC=MENU (); do { switch …

Member Avatar for mrnutty
0
115
Member Avatar for ineedsomehelp:3

[CODE]void printer(char x) { int d, b, z; for(z=x; z>=1; z--) { for(b=z; b<=x-1; b++) printf(" "); for(d=z; d>=1; d--) printf("%d ", d); printf("\n"); } }[/CODE] that's my code which is supposed to print 4 3 2 1 4 3 2 4 3 4 when input is 4. however, it …

Member Avatar for Arbus
0
212
Member Avatar for jrotunda85

Any chance the wonderful people here on daniweb could help me again with a loop? My apologies, loops are not my thing :| Basically what I'm trying to do is add a condition where on the last tweet (that is where the loop = $nooftweets), that tweet gets a different …

Member Avatar for jrotunda85
0
111
Member Avatar for BOOMBOOMF

hey im new in java. i needto make GUI for my program buh im confused as to what to wirte in GUI codes and wat to write in Main codes etc. could someone plz help me? mathprogram.java main class [CODE]public class mathprogram { public static void main (String[] args){ addition …

Member Avatar for mKorbel
0
330
Member Avatar for king03

Please help me out guys I can't fully understand how this code works but I know some about it and I'm also unsure of such things about how it operates. [CODE]#include<iostream.h> #include<conio.h> int main() { for(int i=1; i<=6; i++) { for(int f=1; f<=i; f++) cout<<"*"; cout<<endl; } system ("pause"); return …

Member Avatar for Fbody
0
2K
Member Avatar for LanguidLegend

Hi everyone, I'm new to this site and hope you might be able to help me out? So I've been given an assignment to produce this output [CODE]% ./hw4b foo here foo and foo there % ./hw4b ABC123 here ABC123 and ABC123 there % ./hw4b 'where is' here where is …

Member Avatar for Ancient Dragon
0
326
Member Avatar for helpplease234

Need a little help, I'm trying to run a program that asks the user to enter an integer between 1-50. If given a number between 1 and 50 then echo number then add all integer between 1 and integer entered if user enter an integer not between 1 and 50 …

Member Avatar for Fbody
0
295
Member Avatar for yozzie

Alright - this is my conundrum. As a noob to C++ I am only in chapter 9 of my book, having just covered object oriented programs and the exciting world of vectors and arrays. I have an assignment that asks me to run a loop to get and calculate a …

Member Avatar for yozzie
0
2K
Member Avatar for oybek

Hi guys, I'm not good at programming so would you help me with this?! No fancy codes, just make it simple. Problem Statement For research purposes and to better help students, the admissions office of my college wants to compare how well female and male students perform in certain courses. …

Member Avatar for oybek
0
159
Member Avatar for valestrom

So i'm making this periodic table kinda program here mainly outta boredom. But I came across a problem, when I type in the name for the element, the program just closes. Any ideas on how to get it to work properly. Here's my current code. [CODE]#include <iostream> #include <windows.h> #include …

Member Avatar for valestrom
0
149
Member Avatar for MrHardRock

Hey everyone the program I am writing has to find the mode, max, and median from an array. I think I have everything except there is one error I cannot figure out, thanks in advance. [CODE] import TerminalIO.KeyboardReader; public class med { public static int MAX(int[] a) { int MAX …

Member Avatar for MrHardRock
0
100
Member Avatar for FrancisLazo

Hey there guys I need your help as I do not fully understand the program source code below. This program will multiply two numbers without using the multiplication sign (*). I am confused with the highlighted part, the for loop part. Here it is: [CODE]#include <iostream> #include <string> using namespace …

Member Avatar for FrancisLazo
0
152
Member Avatar for manofhouse

The program is suppose to create and account but if the passwords do not match after the 3rd iteration it's suppose to output that its been too many tries and end the program... I can't seem to figure this out any help would be greatly appreciated. [CODE]while 3: print ("Welcome …

Member Avatar for manofhouse
0
170
Member Avatar for yuyumerry

i got problems to do this c++ program..hope you guys can help me.. You may use output statements that print either a single asterisk(*) or a single blank. * *** ***** ******* ********* ******* ***** *** *

Member Avatar for yuyumerry
0
106
Member Avatar for battlex2010

i have the following code for getting the number of files on a drive: [CODE] Dim num As Integer = 0 Dim drive As String = "C:" For Each File In System.IO.Directory.GetFiles(drive,"*",System.IO.SearchOption.AllDirectories) Try num += 1 Label5.Text = String.Format("Files found: {0}", num) If num > 50 Then RaiseEvent start() End …

Member Avatar for Unhnd_Exception
0
191
Member Avatar for stan2000

I'm trying to write a program which allows a person to enter the number of days they have worked. Their hypothetical salary is 0.01$ per day and doubles everyday (0.02$ on the 2nd and 0.04$ on the 3rd day etc...). For each day, the day number, pay for the day, …

Member Avatar for Arbus
0
141

The End.