578 Topics

Member Avatar for
Member Avatar for jhamill

Hey so this is my code for checking for palindromes...it compiles fine, the problem is it doesnt work. Basically I converted the four sentences into strings without spaces or other characters and added them to a new string called newstr....i used the newstr to check for a palindrome in the …

Member Avatar for NormR1
0
309
Member Avatar for NickPatton

I've written a Rational Class that takes fractions and can add, subtract, multiply, divide etc. I'm trying to keep my fractions reduced but for some reason, some but not all of my fractions are being reduced. I've posted my code below. I commented the fractions that aren't being reduced as …

Member Avatar for NickPatton
0
1K
Member Avatar for Perlie

Hi, I've got a problem to average lines which have same name. For exemple: > Strawberries 10 15 14 20 Pineapples 14 17 2 18 Apples 4 12 24 18 Strawberries 20 12 13 24 I would like to average values by fruit name. So, for pineapples, that easy, it's …

Member Avatar for d5e5
0
214
Member Avatar for jiggaman77777

I'm having a problem getting the number of integers greater than the average in my array to display. I keep getting "You have 1 number greater than the average when there are 5 that are greater. Pls help!!! This is the code I've devolped so far: #include <iostream> using namespace …

Member Avatar for ravenous
0
2K
Member Avatar for Labdabeta

I need to calculate chi squared cdf from x->infinity with n=255 degrees of freedom. I cannot seem to get it to work. You can find formulae for chi squared distributions using google. Here is my non-functional approximation code: double riemannsum(double(*fnc)(double),double dx, double xmin, double xmax) { double ret=0; double x=xmin; …

Member Avatar for Labdabeta
0
613
Member Avatar for grh1107

I'm trying to create a class which finds the sum of multiples for a given base I have the code written with out a class im just having trouble converting it into a class my total function isnt retrieving the data from the object maybe? /* If we list all …

Member Avatar for Banfa
0
180
Member Avatar for gotboots

Hi All Im trying to get this to work, but can only get it to work without putting the form tags in, and wont work with more than one set of the inputs. the below is the result when i use ajax to search for item names, then want to …

Member Avatar for gotboots
0
3K
Member Avatar for TrustyTony

The vanity pages to look how good and active you are compared to others is back from member's #Community Contributions part underlined links. Thank you Dani, now we know again how good we are! *P.S. How many activity points worth is giving a spammer infraction? ;)*

0
182
Member Avatar for blake81

I need a little bit of help with my coding below. Whenever I try to run the second application it gives me momPalindrometrue dadPalindrometrue sisterPalindromefalse racecarPalindrometrue JavaPalindromefalse A man a plan a canal PanamaPalindromefalse Hurray for HollywoodPalindromefalse Mr Owl ate my metal wormPalindromefalse Was it a car or a cat …

Member Avatar for NormR1
0
294
Member Avatar for userct

Hello, I'm trying to write a program using MIPS Assembly Language (I write the code in TextWrangler and run it in QTSpim) I was wondering how I would go about checking if a number is perfect or not. I know my first lines of code may be partially incorrect but …

0
529
Member Avatar for userct

I want to be able to write a program that repeatedly prompts the user to enter an integer. The program determines if that numbers is perfect and then writes out a message saying if it is or not, then prompts once again. I'll end the loop (and the entire program …

Member Avatar for userct
0
2K
Member Avatar for txhornsfan

Hello all, I am having some trouble with my assembly code...still kind of new, but here it goes... The assignment is to desing an assembly program that uses a dialog box to prompt the user for a number. These numbers will be stored in an array. There will be an …

Member Avatar for txhornsfan
0
673
Member Avatar for Bradoz

Hello problem i am having is when trying to multiply polynomial 1 by polynomial 2 polynomial 1 gets mutliplied by the first term in polynomial 2 and not by each term in polynomial 2. Below is my code: ~~~~ /********************************************************************************************* * Multiplies Polynomial 1 to Polynomial 2 * The method …

Member Avatar for NormR1
0
311
Member Avatar for hwoarang69

I am trying to compute 2x-x+4x, so the answer should be 5x. but i am not sure how to get started. The "x"'s are messing me up. I am thinking of using for loop and replace x with '\0'. and than add or sub starting from left to right. but …

Member Avatar for TrustyTony
0
110
Member Avatar for modesto916

Good day, My Data Structure teacher asked me to do a list of exercises, and one of the questions consists of writing a program to solve the numbers decomposition problem, for example: If the user types the number 5: 5 4 + 1 3 + 2 3 + 1 + …

Member Avatar for MonsieurPointer
0
65
Member Avatar for jackmaverick1

I've decided to try to create a small (very) game in Javascript + HTML, using the Canvas element. So far, its gone pretty well, but recently I started on bullets. This also has gone well. I've decided to try to implement a bullet-goto-mouse type thing. I know this uses trigonometry, …

Member Avatar for jackmaverick1
0
152
Member Avatar for Bowsan22

So ive been trying to get an average of this array needed, and I seem to be having trouble with it. So far, my current code just adds the numbers up, but doesnt really average them out at all: [CODE]import java.util.Scanner; import java.util.Arrays; public class Grades { public static void …

Member Avatar for Xinen
0
326
Member Avatar for paintballer1518

Currently having trouble completing my code homework for my class. Help would be greatly appreciated. Write a menu-driven C++ program to manage employee data. Your program should begin by reading in a file of employee information (filename employdata.txt). Each data line contains the following information: {hire date} {employee ID} {salary} …

Member Avatar for paintballer1518
0
2K
Member Avatar for anton_f

I have to find factors of 1-10 then count all factors and find if they are odd/even. I know how to find if they are even or odd i just can't count how many factors for each number. #include <iostream.h> #include <stdlib.h> int main() { int num, icntA, icntB, icntC, …

Member Avatar for anton_f
0
192
Member Avatar for CodeMonkeyJunk

I have a school project and what is needed is to Write a program that prompts the instructor to enter the 10 grades of midterm 1 and store these numbers in an array. Next prompt for the 10 grades of midterm 2 and store these numbers in a different array. …

Member Avatar for CodeMonkeyJunk
0
183
Member Avatar for jumo1807

Hi, I am currently newbie in C++, I just learned it for around 2 weeks, My question is when I put the number, it shows if it's a prime number or not. The only problem when I put 2 and 3, it supposed to be prime numbers, but the fact …

Member Avatar for Lerner
0
133
Member Avatar for Griff0527

I am getting an error during the build stating: "Illegal call of non-static member function" and I cannot figure out 1) what does this mean, or 2) how to resolve it. For detailed clarification, I will type out what the assignment was (I say was because the assignment was due …

Member Avatar for raptr_dflo
0
374
Member Avatar for userct

I need to Compute 2x4 +7x3 -15x2 +3x+2 Using Horners Method. When I run this in QTSpim it doesn't give me any errors but I'm just wondering if everything is running completely right. For instance did I call "x" correctly? I'm trying to load the value for x from memory …

0
146
Member Avatar for FraidaL

I'm writing this program to calculate the best fit line. It's not finished. I'm doing it step to step to make sure it runs so I don't get lots of errors and totally freak out at the end. Right now it runs fine, but something is really off with the …

Member Avatar for FraidaL
0
235
Member Avatar for FraidaL

I wrote this code for a homework problem. The question asks for the inputs to be an array representing a polynomial along with the degree of the polynomial and the value of x. Then it has to return the derivative of the polynomial. Until I ask the program to output …

Member Avatar for Lerner
0
3K
Member Avatar for dushtu.bor

Please tell me why it gives me always zero value? [CODE]<?php $total =0; $memid = $_POST['username']; $leg = $_POST['leg']; mysql_connect ("host", "usr", "paswd") or die ('Error: ' .mysql_error()); mysql_select_db ("dbname"); function getTotalLeg($memid,$leg){ $sql="select $leg from `users` where `username`='$memid' "; $res=mysql_query($sql); $row=mysql_fetch_array($res); global $total; $total = $total+mysql_num_rows($res); if($row['$leg']!=''){ getTotalLeg ($row['$leg'],'lname'); getTotalLeg …

Member Avatar for dushtu.bor
0
180
Member Avatar for FraidaL

I wrote this code for an assignment that asked to create a program that calculates and displays the average of any amount of real numbers. The program is supposed to ask the user how many numbers they want to enter and then use a loop to ask the user to …

Member Avatar for FraidaL
0
3K
Member Avatar for utkarshsahu

I wanted to write a program to check if string entered is a palidrome. I wrote a program but i get errors while compiling. Can anyone help me identify errors in the program. [CODE] #include<iostream> #include<string> int main(){ string input;bool flag=false; cout<<"Enter String: "; cin>>input; cout<<"You Entered "<<input; int length= …

Member Avatar for utkarshsahu
0
183
Member Avatar for KatseasSAvvas

Hi, I'm trying to find a way to solve this equation with two unknowns using Python: [QUOTE](a * b) = (x * c) + (y * d) + e [/QUOTE] Where a, b, c, d and e are all floating numbers provided by the user and x and y are …

Member Avatar for TrustyTony
0
280
Member Avatar for txhornsfan

I am having some problems with my "sum of numbers program," and cannot figure out why I am not getting the correct answers. This is my first Assembly programming class, so take it easy on me, please. The assignment is: Prompt a user for an integer n, compute the sum …

Member Avatar for txhornsfan
0
4K

The End.