Beginners - October 2012 (Page 47)

C++ Program Problem
 
Hello, I am trying to create a program that multiplies fractions and gives me a fraction as an answer and here is what I have so far. Also the answer i get is a...
[5 replies] Last: Well, the answer to why you always get 0 is that dividing 2 integers w... (by Moeljbcp)
H Files problem.
 
Fairly new to C++ programming. Experimenting with multiple files a class I've created won't run. No errors, just won't run. Code below: //in main.cpp #includ...
[3 replies] Last: Thanks a lot, works perfectly now. :) (by Jo Black)
Polynomial Long Division
 
This is my polynomial class along with the consttructor and destructor. I'm having problems making the algorith for Division. My operator +,- and * are working....
[no replies]
Help with a program reading integers from a .txt file
 
Hello everybody, I'm new with c++ and I need some help with some stuff, thanks a lot if you are able to! I need help to write a program that processes the da...
[7 replies] Last: Isn't this (1 <= i <= 10) interpreted like this ((1 <= i) <= 10) ? ... (by Chervil)
Sort the integers of the sequence according to the sum of their digits.
 
can anybody help me , how to add digits within and array index..the problem is Write a program that reads integer n followed by a sequence of n integers. So...
[1 reply] : One trick is to read the number as char array char numbers ; //hol... (by codewalker)
by Aceix
How to make new lines in binary files
 
Hi all, Yes I know that .txt files are also binary files but the question is how do I create a newline, when writing to a "binary" file? eg: When I open a...
[6 replies] Last: @Chervil Thank you soo much! It works. Aceix. (by Aceix)
by yvan
Vector with custom classes
 
Hello all! I'm new here, so I'll start of by thanking you all for a great and helpful community! Many of my former problems have been resolved all thanks to you...
[3 replies] Last: Thanks TheIdeaMan! That resolved my problem! Also thanks for the tip o... (by yvan)
Question about correct format of code
 
So lately on these forums I have seen alot of people using formating like this for (int index = 0; index != n; ++index) { // <- the opening brace /...
[4 replies] Last: Thanks for the replies guys. So just basically pick a style that you f... (by closed account 3qX21hU5)
Adding to Array
 
I'm trying to get this program to output how many grades are above or equal to the average and how many are below the average. #include <iostream> us...
[3 replies] Last: So you have an array with grades in it, and you have an average value-... (by TheIdeasMan)
no error but only 0?
 
hey guys, the given program I wrote gives no errors but when I run it, I only get 0s whats going on? #include <cstdlib> #include <iostream> #include <cmath...
[4 replies] Last: OOOOOOOOOOOHHH jeez, thank you so much!! Learned something new today!!... (by taku nishino)
please tell me what a parkside triangle is
 
well i have to make one and before i make i wont to know what it is and what is the order the number come out random or like 1 12 123 1234 12345 pleas...
[6 replies] Last: I would make two dimensional array all initialized with 0. Then I will... (by yjy4321)
by se123
bacteria growth chart
 
I was hoping that someone could help me or point me in the right direction. I am supposed to write a program that lets you put in a culture count and then calcu...
[5 replies] Last: First - edit your post so it uses code tags - the <> button on the ri... (by TheIdeasMan)
by dkjdod
error: expected `;' before string constant
 
I keep getting these error messages: piApproximator.cpp:30:13: warning: missing terminating " character piApproximator.cpp:30: error: missing terminating " ...
[7 replies] Last: Your result seems OK to 15 significant figures, which is about all you... (by TheIdeasMan)
help with using structures and inputting a file
 
I wrote the code to a program that originally took information saved in a text file and stored it in an array. My professor wants us to use the same program but...
[7 replies] Last: for (int i = 0; i < itemsStored; i++) outputFile << item .plucod... (by IceThatJaw)
deposit with interest program
 
The program is suppose to accepts an amount of money on deposit and a number of years it has been on deposit(years can have decimals). It will determine the in...
[2 replies] Last: Need to correct some of the statements. if(years >=5) { intRate =... (by leftcoast)
SWITCH statement to evaluate functions with domains
 
This is for a class assignment that I have been unable to figure out. I know it can be done using if and else statements but my instructor wants it figured out ...
[6 replies] Last: I cannot think of a way to apply the loop continuation conditions to ... (by TheIdeasMan)
help please
 
nvm
[1 reply] : Well, that doesn't make much sense. void main() is not ANSI C if you ... (by webJose)
Checking an Array for a certain value.
 
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int dice = {0}; int counter = 1,Player_Dice = 0...
[5 replies] Last: Thank you Chervil for all your help! I just have one more question. ... (by FireNutz)
Finding all prime numbers between two numbers
 
So I have to input two numbers between 4 and 1 million and find out all the prime numbers between the two but I need some help... Here is the computational par...
[no replies]
Nested Loop question
 
This was a problem on a test for an intro to programming class. Here is my solution. //Title: test5 //Author: Macon Leighton //Date: 09 October 2012 ...
[4 replies] Last: ok, thanks! (by macleight)
October 2012 Pages: 1... 4546474849... 84
  Archived months: [sep2012] [nov2012]

This is an archived page. To post a new message, go to the current page.