Beginners - April 2017 (Page 30)

How to count words in a C-String?
 
Hey guys, I need your help in figuring this out. It sounds fairly easy and I can do this code when it comes to just counting every word encountered by 1 space a...
[4 replies] Last: The character(s) should match one of my if or else if statements. B... (by jlb)
How do I make loops for seperate cases
 
Hi, Im trying to make a switchcase calculator but I don't know how to make my other cases loop indefinitely while setting one of my cases as a breakpoint when...
[4 replies] Last: @handy Andy Thanks for the tip, it worked out as expected :D (by Jacketto)
by rufi0h
Compound Interest in a for loop.
 
Hello all, I am new at programming, in my first semester at school. I am trying to crate a function that takes the user inputted investment amount, months they ...
[7 replies] Last: I see what you mean, i didn't realize that you could return the equati... (by rufi0h)
Sieve of Eratosthenes
 
Can someone explain the "Sieve of Eratosthenes" to me. I'm a bit confused on what I am suppose to do. Is it just printing out 1 to max using for loops? Crea...
[3 replies] Last: Is this code correct? Yes, the algorithm is basically correct, as lo... (by mbozzi)
Convert words to its corresponding number
 
I have to convert spelled out numbers (i.e.: seven //input 7 //output) I had a previous question of converting the number to a word and came up with this: ...
[5 replies] Last: Thank you!!:) Much appreciated for the help! Not that advanced yet... (by CoderGirlV)
Hey Folks. Just a quick question
 
This is total newb stuff so be gentle. So I am supposed to use a "water pump" method of reading a text file. This parses character by character and dumps that...
[6 replies] Last: Thanks a lot, AbstractionAnon! (by Enoizat)
code giving unintended result
 
Hi I need to create a cup and ball guessing game. I am to create a random nbr btw 1 - 6 inclusive. Tries allowed is 3. See my code below ... seemed not to work...
[3 replies] Last: you should use code tags so I can respond with line numbers. after R... (by SamuelAdams)
by workie
C++
 
Write your question here. print the code the following asterisks using while loop C++ ***** ***** ***** 2. ***** **** *** ** * 3.***** ...
[1 reply] : for each row print 5 stars. for each row print 5 stars -row nuber... (by codehelper)
I am facing compiling errors.
 
The program code #include<iostream> #define WINDOWS 1 void console_clear_screen() { #ifdef WINDOWS system("cls"); #endif #ifdef POSIX system(...
[2 replies] Last: Hello anighosh2017, Welcome to the forum. PLEASE ALWAYS USE CODE TAG... (by Handy Andy)
Help
 
Why is my program starting to count to 3 instead of 0? I am doing for loops for every car that entered and count the money of paying cars but also count the ca...
[5 replies] Last: Adding one of these two flags: -std=c++11 or -std=gnu++11 to the ... (by Enoizat)
Need help with Shopping program?
 
Hey guys, so I was writing a code for a shopping program assignment, ad the directions are as follows: Write a program in C++ that allows a customer to go on-...
[17 replies] Last: This is a sample pattern to do what you are looking for: #include <i... (by closed account 48T7M4Gy)
by wuyou
i'm a beginner.
 
what's wrong????? #include <iostream> using namespace std; int tree_0 ,tmp ; int main(){ int last=2; int debug2=2; for(int i=3;i<=7;i++){ for(...
[1 reply] : The best way to get help is: 1. Describe the problem. 2. What does the... (by closed account 48T7M4Gy)
Linked List Sort Help
 
I'm trying to find which student has the highest GPA and return the student name. I get an error that says N may be uninitialized and I am not sure why that is ...
[2 replies] Last: Thanks for the help! (by hockey34)
Help with Lotto Program
 
I'm stuck on this assignment, which is: Write a program that simulates a lottery. The program should have an array of 5 integers named winningDigits, with a ra...
[2 replies] Last: I changed the nested for loop to: for (int i = 0; i < 5; i++) { f... (by thhs345)
Please Help, The program keeps adding up previous expense type
 
Whenever I add the second expense type, it keeps adding the previous expenses as well so it runs looking like this; MONTHLY EXPENSE PROGRAM __________________...
[2 replies] Last: ^ Thanks man! That was the exact problem! (by imastruggler)
How do I determine if my iterations are converging?
 
Hey everyone, sorry to bother. I'm working on a quick program for Jacobi iteration to find a solution vector. For those not familiar with it in simple terms wha...
[3 replies] Last: On the issue of allclose, this is the key to the test while the rest o... (by closed account 48T7M4Gy)
Help with simple calculator program
 
This simple calculator program currently exectues by asking a user to choose an operation. It's followed by asking which 2 numbers they'd like to perform the op...
[2 replies] Last: To do what you want you have to parse the input string which means: 1.... (by closed account 48T7M4Gy)
Cin input
 
I know i ask alot of questions but as you can see I REALLY am a beginner. Let me just put straight out what it is im doing and what exactly i need help with. ...
[4 replies] Last: Multiple post, same topic http://www.cplusplus.com/forum/beginner/212... (by SamuelAdams)
The number place of a letter in the alphabet
 
For example: The letter B is the 2nd letter in the alphabet and the letter N is the 14th letter in the alphabet. How would i even make that into a c++???
[5 replies] Last: Multiple post, same topic http://www.cplusplus.com/forum/beginner/212... (by SamuelAdams)
How do you access an element within a string?
 
I can't figure out the last part of this assignment ("Read the user's date of birth: 2 digits for the month and 2 digits for the day..."). I'm hoping someone he...
[1 reply] : Hope this can be useful: // How do you access an element within a s... (by Enoizat)
April 2017 Pages: 1... 2829303132... 34
  Archived months: [mar2017] [may2017]

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