Beginners - October 2015 (Page 46)

Loop storing 2 max numbers and 2 min numbers.
 
Hi there i am having trouble with my program, what the logic is implying is that every time i enter a big number, it should save as the biggest integer, if i en...
[2 replies] Last: When using ‘if’ and ‘else’ commands while writing your code it... (by sleeky)
Need Urgent answers for this questions !
 
* So i got this 2 questions, homework in school i got to cout what it asks, but my professor says i did not follow all the instructions: I should mention i'm a ...
[5 replies] Last: I putted i instead of j that should work : #include <fstream> str... (by Ericool)
Range 1-20 Table that shows divisibility
 
I have to write a C++ program that 1.Requests a positive number “N” from the user that is in the range [1, 20]. If the user enters a number outside this ra...
[no replies]
Could someone help me understand whats wrong
 
Not sure if it's (rand() % 6 + 1) or my if and else statements. Could someone help me with this. Also is there any way to attach an image of the output im gett...
[9 replies] Last: Consider a function: #include <iostream> #include <stdlib.h> #inclu... (by pearlyman)
by Marth
ifstream question
 
I'm writing the babynames program, I have a do-while loop over the entire code, so you can re-search for a name from the database. I have the babynamesFile...
[1 reply] : Please show the contents of your input file. You should also always b... (by jlb)
Another inheritance question
 
Hi everyone! can you please explain me WHY in the C class,the line "B _b1;" doesnt activate the B deafault CTOR? and i will be glad to get some advices on ...
[3 replies] Last: Because you used the initialization syntax :_b1(0) That override... (by AbstractionAnon)
by tnt980
code errors
 
Write your question here. /* * File: main.cpp * Author: Zac * * Created on October 6, 2015, 5:54 PM */ #include <iostream> #include <cmath> using...
[10 replies] Last: Where to begin? The first problem with your code, (and there are a fe... (by pearlyman)
Programming Assignment
 
I am trying to write a program that will take a sentence like "This is a TEST Sentence" and return "tHIS IS A test sENTENCE" Using arrays and user defined func...
[3 replies] Last: This is what I have so far #include <iostream> using namespace std; ... (by tcc5164)
by sleeky
simple loop to compare numbers
 
Hi, i am working on a code, i am trying to compare the numbers from Largest, Second Largest, Second Smallest and Smallest using a simple loop and use if and el...
[18 replies] Last: If you check out your original code, you had > instead of < for the sm... (by AndyP2609)
by guru23
Printing first 3 digits
 
....
[7 replies] Last: while(x > 10) should be while(x >= 1000) (by LB)
by tnt980
errors
 
/* * File: main.cpp * Author: Zac * * Created on October 6, 2015, 5:54 PM */ #include <iostream> #include <cmath> using namespace std; void display...
[3 replies] Last: Closing curly braces at start of main() function, meaning that all aft... (by AndyP2609)
by tnt980
switch case movie age whats wrong with code?
 
#include <iostream> #include <cmath> using namespace std; void displayRatings () { cout<< "1. G Rating."<<endl; cout<< "2. PG Rating."<<...
[5 replies] Last: I have to agree with the previous comment. Too many variables are not... (by AndyP2609)
by Arquon
How do I print 2 cout answers ?
 
Hello, how can I print two cout answers if both are correct ? I have put // near the ones that i want to appear. #include <iostream> #include <iomanip> #in...
[13 replies] Last: would it not be possible to use a switch? There is nothing in the O... (by AbstractionAnon)
While loop is not working
 
I am writing a program for mcdonald ordering system, now I extracted one part of my program. I don't know why the while loop is not working, it just runs once. ...
[4 replies] Last: And the problem really exists in else solved=0;break;} . Thanks!... (by jekaterina)
help with errors on hangman rewritten by functions
 
hello i need to rewrite the hangman in ch 4 to separate it into 3 functions but having a little trouble..i'm getting some errors Error 1 error C2065: 'used' : ...
[3 replies] Last: Sure, yeah that's a nice improvement. Wouldn't it be better if you ke... (by arzhon)
passing objects by pointer and by reference
 
Hi there! Could someone explain to me what is the difference between passing objects by pointer and by reference? Let's see this example: #include <i...
[3 replies] Last: Hi Yanson, Thank you very much for your help! Just one more question... (by hebrerillo)
Trouble with reversing letters w/o using string
 
When compiled, it only gives me added numbers of letter numerical value. What am i doing wrong? #include<iostream.h> #include<cstdlib> #include<stdlib.h> ...
[1 reply] : Please edit your post and make sure your code is [co de]between cod... (by LB)
by Marion
highest and lowest value with array.
 
Hi. I don't know why it this code isn't working. I even tried to copy the format of another code that seemed to work perfectly fine and yet when I try it with m...
[2 replies] Last: Thanks for the answer. I just fixed it, I think. I put the cin and the... (by Marion)
This problem is kinda like the Goldbach's conjecture
 
When I input a number n the program is supposed to show the nth sum of two primes. According to the Goldbach's conjecture, all even numbers can be made with the...
[no replies]
Void as an int?
 
This void prints the rfid value on the lcd screen; void dump_byte_array(byte *buffer, byte bufferSize) { for (byte x=0; x < bufferSize; x++)...
[1 reply] : You don't need to convert to int. You can compare them with memcmp: h... (by coder777)
October 2015 Pages: 1... 4445464748... 57
  Archived months: [sep2015] [nov2015]

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