578 Topics

Member Avatar for
Member Avatar for kishpopboy

pls help.. I have a to create a timecard calculator. it goes this way txtbox1 is for their 1st in txtbox2 is for their 1st out textbox3 is for the difference of txtbox1 and textbox2 txtbox4 is for their 2st in txtbox5 is for their 2st out textbox6 is for …

Member Avatar for kishpopboy
0
161
Member Avatar for oberlin1988

I'm writing a program that checks a txt file with a list of words (one word per line). I'm just this side of done, I think. [CODE]def StripPunctuation(s): answer="" for c in s: if c.islower() or c.isupper(): answer=answer+c.lower() return answer def Reverse(s): answer="" for c in s: answer=c+answer return answer …

Member Avatar for Lucaci Andrew
0
3K
Member Avatar for mags11

I am trying to get the program's decimal to output in two decimal places after the decimal. Please advise. [CODE] // MilesPerGallon.java // Program designed by XY import javax.swing.JOptionPane; // Needed for JOptionPane. import java.text.DecimalFormat; // Keeping proper decimal format. public class MilesPerGallon { public static void main(String args[]) { …

Member Avatar for mags11
0
2K
Member Avatar for CY0T3R

/*PROGRAM TO PRINT SUM OF THE FOLLOWING SERIES - X + X*X/2! + X*X*X/3! + X*X*X*X/4!....n terms. I'm not getting the correct output. eg-for n=3 and x=2; compiler's ans = 4.66 correct ans = 5.3. HELP ME OUT...*/ [CODE]#include<iostream.h> #include<math.h> #include<conio.h> void main () { clrscr(); float x,sum=0; int n,fact=1,j,k; …

Member Avatar for CY0T3R
0
217
Member Avatar for rfrapp

Let me start off by saying that this is homework, and I have most of it completed. However, I am stuck on how to convert decimal to hexadecimal. The assignment is to add two hexadecimal numbers and output the answer. If the length of the answer is greater than 10 …

Member Avatar for rfrapp
0
3K
Member Avatar for anurag awasthi
Member Avatar for DeanMSands3
0
182
Member Avatar for Megann1120

I'm working on a program that lists a numbers prime factors. I've finished the bulk of the work and all I have left is the first print where it says the number is prime or composite. I know the way I'm going at it is wrong because it wont work …

Member Avatar for Megann1120
0
294
Member Avatar for ddanbe

While surfing the web I got to this site: [url]http://en.wikipedia.org/wiki/Fourier_series[/url] “Hey, I why not write something like this in C#!” The rather scary looking formulas did not withhold me to start coding (see below Fig. 1 and Fig. 2) The formula from Fig. 2 is hidden under one of the …

Member Avatar for skatamatic
0
3K
Member Avatar for Thisisnotanid

I need advice. I'm writing a calculator; I've got the basic functionality of it down, and have finally moved to having it process functions. In this regard, I find the standard library of mathematical functions provided by Python unsatisfactory. While the more commonly used functions are defined, some of the …

Member Avatar for Thisisnotanid
0
381
Member Avatar for Joniniko

Alright so basically i need to create a simple maths game in C. Involving addition subtraction and multiplication of random numbers. But i also need to add a timer to that. So lets say you are given 10 seconds to answer the question and every correct answer adds you 10 …

Member Avatar for JilMakias
0
450
Member Avatar for kiki256

Hey, I have to build an addition calculator. in the application interface should have a label on top which displays the number you clicked then under the label a running total label and then under than there should be a keypad with numbers from 0-9 and a plus sign. my …

Member Avatar for abelingaw
0
298
Member Avatar for dippatel

hi im told to make a program where the user enters a large number like 13195 and the prgrams gives it the highest prime factor, which i 29. now i have to do this using recursion in basic c, without using loops of any kind, so noo for, while etc. …

Member Avatar for VernonDozier
0
7K
Member Avatar for pwolf

Im stuck with the following: Define a function isPrime(number) that takes in a number as argument and return True if the number is a prime number. Hint: A number, x is a prime number if it is only divisible by 1 and x itself. By definition, 1 is not a …

Member Avatar for pwolf
0
459
Member Avatar for rfrapp

I'm writing a program to add two hex numbers of up to ten digits, and I'm recieving an "assertion failure," and I can't figure out why. Any help would be greatly appreciated. Thank you for you time! [CODE] // hex addition.cpp : Defines the entry point for the console application. …

Member Avatar for WaltP
0
289
Member Avatar for LogicalOutlier

This program determines the grade average, raised grade average, of individual students and all students. The program takes scanner input. In the scanner, the number of students, the number of grades for each student, and the grades of each student are entered. Ultimately, I need to print out each student's …

Member Avatar for hiddepolen
0
2K
Member Avatar for patk570

Hello everyone. I seem to be having trouble with the doMath() section of my code. I was wondering if you can help me out... [CODE] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Package Plans</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Content-Style-Type" content="text/css"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <SCRIPT LANGUAGE="JavaScript"> function …

0
95
Member Avatar for rfrapp

I'm writing a program that adds two hexadecimal numbers of up to ten digits. I'm trying to use the POW function, but for some reason it's underlined. Why is that? [CODE] // hex addition.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <string> …

Member Avatar for LRRR
0
583
Member Avatar for pwolf

How to return the sum of the last digits of the values in a list? i cant think of an efficient way. If it wasn't for being in a list i could do it, but im really lost. Can anyone advise me? im going to look for a way in …

Member Avatar for pwolf
0
4K
Member Avatar for ThaiAmL

Hello! I'm studying right now as an exchange student in Germany and taking my first programming course in Java, and in the last week, things have just started to go over my head and I'm kind of drowning while trying to get all the homework done! The assignment was supposed …

Member Avatar for ThaiAmL
0
998
Member Avatar for MrsHeard

[CODE]#include <iostream> #include <cmath> #include <iomanip> using namespace std; int triangleType(double x1, double y1, double x2, double y2, double x3, double y3); double distance(double a1, double b1, double a2, double b2); int main() { double x1, y1, x2, y2, x3, y3; cout << "Enter vertices for the triangle." << endl; …

Member Avatar for MrsHeard
0
387
Member Avatar for patk570

Trying to figure out why this SIMPLE math function will not work. If anyone can help me that would be great....Thanks [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Calc Price</title> <SCRIPT LANGUAGE="JavaScript"> function doMath() { var one = eval(document.theForm.elements[0].value) var …

Member Avatar for Airshow
0
214
Member Avatar for DarkPyros

im wrote a program to determine weather a triangle is scalene, isosceles or equilateral based on the given side lengths...its not working properly..i.e its giving isoceles when i enter data for an equilateral...etc etc... i fugured it was my logic in writing the program that was missing something....could anyone tell …

Member Avatar for WaltP
0
202
Member Avatar for borgyborg

Hi All, I want to auto-calculate all the array textboxes I created. My code is: [CODE] <?php echo "<table>"; $sql="SELECT default_salary FROM records WHERE is_active = 'Yes'"; while ($row=mysql_fetch_array($result)) { $default_salary = $row["default_salary"]; $num_rows = mysql_num_rows($result); echo "<tr>"; echo "<td>"; echo $count."</td>"; echo "<td width=\"\" align=\"left\" border=\"0\">"; echo "<input type=\"text\" …

Member Avatar for diafol
0
859
Member Avatar for c_learner

Dear All, I'm new to C, and would appreciate your help about the below code. The purpose of the program is to multiply the elements of the array and print the result. The user enters the value for how many elements he wants to have multiplied, and then the function …

Member Avatar for c_learner
0
2K
Member Avatar for ddanbe

When you want to draw something on a form you need a Graphics object. But a Graphics constructor isn’t public and if that is not enough the Graphics class is also sealed! This means you can’t create a Graphics object via the new keyword nor can you derive from the …

Member Avatar for skatamatic
0
4K
Member Avatar for Octipus

All right. So i have child, parent, activity and register table and i want know how much money a parent will pay for his child if the child have 1 or more activities. So i came out with this code: [CODE]SELECT CONCAT_WS (' ', parent_title, parent_fname, parent_sname) AS 'Parent/Carer Name', …

Member Avatar for Octipus
0
216
Member Avatar for Chuckleluck

Hello, I'm using SFML to make a game, and, as it has no built-in collision detection function, I made up my own algorithm. Here it is: [CODE] // Collision.cpp #include "Collision.h" Side CollisionBoxTest(sf::Sprite Hitter, sf::Sprite Hittee) { sf::Rect<int> HitterBox; sf::Rect<int> HitteeBox; // Initialize parameters for Hitterbox int BoxHeight = Hitter.GetHeight(); …

Member Avatar for Eagletalon
0
211
Member Avatar for the_kitoper

I have a problem, whenever I attempt to use the following expression it returns -3. Can you please explain why this is? [CODE] int level = ((RoD * 10) - 50) / 15; std::cout << "Level = " << level << std::endl; [/CODE]

Member Avatar for LRRR
0
172
Member Avatar for hovestar

I'm trying to devise a program that attempts to solve the Collatz Conjecture, Wikipedia, but when I run it I get this error: [CODE] What value would you like to find if the collatz works for below?6 Traceback (most recent call last): File "/private/var/folders/fL/fL1lGxccGCypPBSIUXNGZGpkwIg/-Tmp-/Cleanup At Startup/Playground-345866896.786.py", line 27, in <module> …

Member Avatar for TrustyTony
0
247
Member Avatar for topdos

hi i am new here and i registered because i couldn't find the answer in google search my problem is that i could not find max and min of two arrays and the average too [CODE]#include<iostream> using namespace std; int array1[]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; …

Member Avatar for topdos
0
449

The End.