Beginners - October 2014 (Page 19)

C Program not giving correct output
 
This is a program in C that is not working for me. It is supposed to take a value i and also a multiple j and round i up to the nearest multiple of j. My prog...
[5 replies] Last: Ah ok thanks guys. (by Cheetofingers)
change the loop
 
Write your question here. // Program Looping uses a count-controlled loop to read and 02 // sum 10 integer values and an event-controlled loop to 03 // read ...
[2 replies] Last: // Program Looping uses a count-controlled loop to read and // sum 10... (by closed account 48T7M4Gy)
Need help with a loop I made.
 
So, the assignment I have is to repeatedly ask a user if they would like to add tests and then create the average for the scores combined that they have added. ...
[8 replies] Last: Cheers chree3pO, If there was only one way then all we'd have to do i... (by closed account 48T7M4Gy)
program stops running in case 1
 
Hey Guys, i'm a student in a community college and i am taking an intro to programming using c++. Any way i wrote this program to calculate reforestation rate a...
[1 reply] : That is because your while loop is executing infintely. It runs so lon... (by TheKingOfTyrants)
help with program
 
I am writing a program where the user enters postive numbers and the program outputs the average, and then asks the user if they want to repeat the program....I...
[3 replies] Last: It is not necesary... you are alright... :D....I edited.... thanks (by Java90)
Making a Makefile
 
Hi! I'm trying to learn programming and I'm having some trouble with a makefile; I'm trying to make a makefile but when I go to compile it this error com...
[3 replies] Last: Um, there shouldn't be any file named "Makefile.cpp". A makefile is no... (by Duthomhas)
I can't get my second diver to appear
 
Doing a midterm assignment, and it is almost complete. The program is supposed to grade divers and give them a rating. You give the name and city of each diver,...
[7 replies] Last: I also don't know how validate the yes no at the end of the program. (by Endymion)
filled in the missing code
 
Write your question here. // Program CountMarks counts punctuation marks in a file. #include <iostream> #include <fstream> using namespace std; int main (...
[4 replies] Last: OK ... here it is again. I think you must have missed something. #i... (by closed account 48T7M4Gy)
My First C ++ Program (Determining Prime Factors of a Number)
 
#include <iostream> #include <string> using namespace std; bool chk(int i); string prime = " is already a prime number"; string factor = " is a prime fa...
[3 replies] Last: Wow! Thank you very much for your replies. I will try it again. (by august30)
help me out please
 
Write your question here. there are some questions in my code i need to apply some changes // Program Switches demonstrates the use of the Switch // s...
[3 replies] Last: there is something wrong could you please write the codes again ? the ... (by fahod1990)
Functions using different programs to compile
 
Hello, I am trying to use a string to convert a person's name to be in this format last name followed by a comma followed by the rest of the name. "Last name"...
[4 replies] Last: if (name !== '') word } What is "word"? EDIT: string firstn... (by TheToaster)
by Kernul
Tic Tac Toe Game
 
I'm doing the exercises here: http://www.cplusplus.com/forum/articles/12974/ I'm doing the Tic Tac Toe one and for now without the other points. This is t...
[11 replies] Last: Please mark this thread as solved if you have solved your issue. :) (by TheToaster)
How can I loop back to start of this simple programme?
 
I would like to loop back to entering the first number. I am a newbie at C++ and trying to learn : ) Thanks guys #include<iostream> using namespace std; int ...
[3 replies] Last: Okay loops are used to do something repeatedly while a certain conditi... (by closed account SECMoG1T)
Adding elements to one sum
 
CanĀ“t figure out how to add values from a vector in a function. #include <iostream> #include <vector> #include <numeric> using namespace std; // Function...
[1 reply] : Fixed it!!! for (int i = 0; i < sizeOfVector; ++i) { sum = su... (by patriic48)
Need help linking structure with function and switch statement.
 
I'm having an issue with my functions. It's saying certain identifiers aren't declared. I've already declared them in main. When I try to compute it within the ...
[3 replies] Last: You need to pass them as arguments. Line 56: You're not calling A... (by AbstractionAnon)
by tdk93
input of a program from file but no output on stdout
 
I did this prog.exe <input.txt> output.txt //This works fine, that is output goes to the file prog.exe <input.txt> cout //OR prog.exe<input.txt> stdou...
[2 replies] Last: This did it. Thanks a ton! (by tdk93)
Calculating Average value of values in a dynamic vector
 
How do I create code that can calculate the average values from numbes typed in? #include <iostream> #include <new> using namespace std; int main () ...
[1 reply] : If you had a list of numbers on a piece of paper, how would you calcul... (by Peter87)
Printing out a Monthly Calendar
 
I need to write a program that only accepts a month and year between 1/1901 and 12/2099 and print out a monthly calendar (January 1, 1901 is a Tuesday). I know ...
[7 replies] Last: *update* #include <iostream> using namespace std; int main() { ... (by azl4182)
Can't seem to understand fork & exec
 
Hello I think that fork & exec is something really useful, but I just can't seem to understand it. Could someone make a simple example of fork & exec? ...
[4 replies] Last: I got the code to do it. int pid = fork(); if (pid == 0) { execl("... (by Nielyboyken)
Cin to a vector
 
How do i cin to a vector. It seems right but the program prinitng out values of zero instead. #include <iostream> #include <vector> using namespac...
[6 replies] Last: You are filling it. It is just you are creating equal amount of zeroes... (by MiiNiPaa)
October 2014 Pages: 1... 1718192021... 70
  Archived months: [sep2014] [nov2014]

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