Quantcast
Channel: Programming Forums
Browsing all 51036 articles
Browse latest View live
↧

Image may be NSFW.
Clik here to view.

Problem with a loop

I had to make a program calculating Pi, n number of times with the formula Pi = 4[1-1/3+1/5-1/7+1/9…+(((〖-1〗^n )))/((2n+1) )] . The user is supposed to enter n and run until the user tells it to stop,...

View Article


How to rerun a program with a loop

I have a program that randomly generates 5 playing cards from a 52 card deck. The program runs fine. Each card is displayed in a separate panel. The next objective I'm trying to accomplish is how to...

View Article


Image may be NSFW.
Clik here to view.

Help Solving a Puzzle

Hello all! Today, my professor gave us a puzzle to solve using programming, but it has stumped me. Here is the problem: QuoteYou're given a hundred dollars and told to spend it all purchasing exactly a...

View Article

Where to go from here?

I feel like i've got the basics down and now want to move on to more "intermediate" concepts. I've done all the loops, arrays etc. I've done reading and writing to/from text files and made loads of...

View Article

how to work with zero

How to work this code with zero/0 ? ; this program asks the user to enter two numbers, and decides whether ; the first or the second entered number is bigger. .model small .stack .data text1 db 'Enter...

View Article


c++ Program not working the way I want it to

The question is: Write a program that: a. Find the smallest integer n such that n2 is greater than 12,000. b. Find the largest integer n such that n3 is less than 12,000. #include<iostream> using...

View Article

How do you open a file in a Homegroup?

Hi this is my first post here, I am making a "chat room" program for people in your homegroup, but i cant seem to figure out how to open a file from your homegroup, i know whats wrong but i cant fix it...

View Article

Collision Intersection causes movement to stop

I'm having an issue with collision detection, where when I run into walls I can no longer move. I know this is because I'm still "Intersecting" with the collided object, but I don't know how to solve...

View Article


Errors when compiling TestP.cpp random numbers program.

Hey everyone, I am getting errors when I try to compile this program: Implement a method countValue() that counts the number of times an item occurs in a linked list. Remember to use the STL...

View Article


Bubble sort algorithm

Bubble sort to sort an array of string objects. The program fills an array of ten string objects by reading in user input at the keyboard. I have the following program which compiles but i recieved a...

View Article

What has made you a better programmer?

I've been coding in C# for a couple months now after switching from C++. I was wondering if you could share with me some of techniques you've learn that you believe have made you a better and more...

View Article

C++ program only asks for input doesn't input any numbers

The question is: Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, and computes the total and average of the input...

View Article

PS3 for control?

Hey I'm writing a program that use the PS3 controller for input. I'm coding in VB .Net and I cannot get more than the d-pad and 4 buttons to work. I'm using direct input. Has anyone here got more than...

View Article


Reading characters in file

I have to write a program that asks the user to enter a filename, and also a specific character that they want to be read. The program will display the amount of times that it is in the file. An...

View Article

Passing object from other classes (very basic)

I know how to do this in Java, but it seems to have a little different syntax in Python. I have two separate classes, Fruit, and FruitBasket. I'm going to be adding a lot more functions to each...

View Article


HW project with input variables

So i am doing a HW project with input variables but i have something weird happening for my first input. Secondly Any pointers to the HW project. I will paste the HW instructions here: Using the turtle...

View Article

JavaFX GUI problems

So, I am new to javaFx, and I am getting a whole lot of troubles from trying to run my project. so I am just trying to get it to run right now. and It won't even do that and I am tired of sitting here...

View Article


Reading in characters from file

I'm trying to pass a file name to a function which in turn reads in the file's characters one at a time and stores their frequency in an array of 0-127...so say the first character is a, and a's...

View Article

What is the difference between using * and -> for assigning pointe

I'm a bit confused on whether to use *pointer or pointer -> for assigning a value withing a function to a pointer. For example, i have this program where i used * notation and got an error: #include...

View Article

bufferedreader reads a specific line but line doesn't show up

First of all, hello everyone! I joined this webiste because I had a problem with the following code, and found half of the answer on this forum package oben; import java.util.Scanner; import...

View Article
Browsing all 51036 articles
Browse latest View live