Beginners - October 2018 (Page 22)

How to make a loop exit and stop putting values into an array
 
The goal of my program is to have the user input sales from a given day and the number of iterations is unknown. How do I make the program stop inputting values...
[10 replies] Last: const int capacity = a_big_enough_number; double numbers ; int size =... (by ne555)
int comparison with a string problem.
 
Hey yall. This program is supposed to take a string, check it for numbers or letter, then spit them out if found. I'm getting an error with the i < p.length...
[2 replies] Last: Ahh. I got you. Thanks for the tip as well. (by jjordan33)
Enumeration
 
What is enum used for, and why should I use it?
[2 replies] Last: one place I have used them a lot is to 'name' and size array (vectors)... (by jonnin)
if statement inside switch case doesn't work
 
Hi all! Could you explain and help me? after i input "a" and then going to ask again, well it does not print the number. BTW, i am using turbo c for school purp...
[3 replies] Last: @poteto, what is that? @dhayden. Now it's okay. Is it bad for using s... (by daryledevs)
I got trouble making functions in c++
 
Help from my code? // Calculator.cpp - This program performs arithmetic, ( +. -, *. / ) on two numbers. // Input: Interactive // Output: Result of a...
[2 replies] Last: Why use a std::string when your operator input is a single character... (by closed account E0p9LyTq)
Change Calculator using loops
 
Hey all, I'm really new to C++ and REALLY struggling with my online class. I'm stuck on a homework assignment where we have to create a program using a provide...
[1 reply] : Hello tundabolt, One reason you have not received any replies yet is ... (by Handy Andy)
Calculating the average
 
Can anyone help steer me in the right direction?? My assignment is to create a simple program with 3 functions. The main function prompts for student name and g...
[4 replies] Last: Hello tdknapp, Most of what I have to say ended up in the program as ... (by Handy Andy)
by Fortem
Pattern
 
I am really confused on how to to this pattern. (this must be the output with cin) ________1 ______1 2 ____1 2 3 __1 2 3 4 1 2 3 4 5 (the underscore represen...
[3 replies] Last: Does it really matter how many rows there are, if your math is solid? ... (by keskiverto)
read binary dat in class
 
HI!! i want to ask if anyone knows how can i link my main.cpp to storeItem.cpp. the program can compile, but when i want to display the data, the data is empty....
[4 replies] Last: What do you not understand? Do you understand that you can't write a... (by jlb)
Need help!
 
Write your question here. I am facing issue as I am getting wrong answer in the BITOBYT question on Codechef. This is in python y=n%27 z=n//27 if(y<=2)...
[1 reply] : Isn't Codechef a competition, where you show the extent of your knowle... (by keskiverto)
by harrya
Question for maclaurian series
 
I have written this code for Maclaurian series. however, this is not getting executed. Kindly help double ExpSeries(double x, int N) { //int acc = 1; ...
[4 replies] Last: // this local N hides the parameter N - // What do you mean by this l... (by keskiverto)
by AL88
Why wont this compile?
 
I tried putting the out of class function in the class and declaring it a friend but i couldnt do it. How do i change it to make it compile? #include <i...
[1 reply] : If something does not compile, then compiler tells the points that con... (by keskiverto)
Help for calling from main to a class
 
How can i call the value of setLength and setWidth from the main() to the class Rectangle from another .cpp file? //MyRectangleClassProgram.cpp // Th...
[1 reply] : Hello OlaveraLuffy, At first I thought you are including a ".cpp" fil... (by Handy Andy)
Fibonnacci Sum of Elements Help
 
I need help figuring out the algorithm for the sum for all of the elements. I have the sum commented out, Everything else functions properly, but I am having a ...
[1 reply] : Every time you calculate a new value ... add it to the sum. That's it... (by lastchance)
Lottery outputting only 1 number
 
Writing a lottery program that has an array size of 20 that can select numbers from 1-100. The main function must include: main(){ declare array and ot...
[5 replies] Last: Hello urawrath, You are welcome. Good job. Andy (by Handy Andy)
Issue with loop counter
 
Hi, I'm doing a personal cpp challenge to help me learn. My program takes an integer (int x) and loops that in a cin input for that many strings. (string 1) For...
[2 replies] Last: DUUUUUUUUUUUUUUUDE. There's a count find!? Thank you. (by jjordan33)
how to split a number into the whole integer part and the decimal part?
 
For my assignment,I have to write two functions, one called integer and the other decimal. For decimal i have double decimal; cin >> decimal; double whole...
[1 reply] : #include <iostream> int integer( double value ) { // conversion... (by JLBorges)
Need help. Can someone explain this to me?
 
I need help. I understand most of tgis codes but I struggles ononunderstanding understanding that do statement # include<conio.h> #include<iostream.h>...
[1 reply] : Hello Chrome68, line 21 is the start of a do/while loop. line 38 is t... (by Handy Andy)
Need help on this homework array question
 
Prompts the user to enter floating point numbers that represent daily sale amounts at a store o Allows the user to indicate the end of user inputs with -1 o Va...
[4 replies] Last: Hello vmansuria, PLEASE ALWAYS USE CODE TAGS (the <> formatting butto... (by Handy Andy)
Beginer coding
 
Hello, c++ community! I am struggling as a new beginner in programming studies. Since I started from "0" in September till now, I would like get some help. ...
[1 reply] : Surely you know how to do something, so show us what you can do... (by SamuelAdams)
October 2018 Pages: 1... 2021222324... 28
  Archived months: [sep2018] [nov2018]

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