Beginners - June 2019 (Page 9)

Binary number maximum 1's
 
okay solved
[11 replies] Last: still stuck lame? Duthomhas answered so I will give you a few more hin... (by jonnin)
by annw3y
salesman
 
Hеy guys, I have a problem solving the traveling salesman algorithm if anyone can help me i would appreciate it...I have this code but I do not know how to sol...
[5 replies] Last: the most simple 'solution' is literally a vector of {city, city, cost}... (by jonnin)
by lame
help plz
 
Can somebody plz explain the approach to this problem. I have got partial in it. I have no idea how to get full AC in it. link-https://www.codechef.com/JUN...
[13 replies] Last: You should know that the CodeChef adjudicators are aware that people a... (by MikeyBoy)
by cc046
Geometric Progression Nth term
 
Find the nth term of G.P first term of G.P is given.... Common ratio is also given... CONSTRAINTS- n<10^9 INPUT: n=2 first term a=10 common ra...
[3 replies] Last: i got it..... ll square(ll n) { return n*n; } ll power(ll a... (by cc046)
Correct Method
 
Hi all, New to C++. I am learning on my own using C++ Primer and I am doing one of the problems about vectors. My code runs and does what I want. All I am lo...
[3 replies] Last: Thank you to both for the useful comments. I will implement them in my... (by christianwos)
Employee class
 
sorry for the lengthy post but i wanted to make it clear what i am supposed to be doing Write a class named Employee that has the following member variable...
[7 replies] Last: I removed "It was set to zero" and ill make note of it to my professor... (by mercedx)
Banking total money
 
I have a problem in which my functions aren't working on line 126 and 155. I have been trying to make it read it and properly display the total money of someon...
[2 replies] Last: Hello Deadweight77, I do not know if this is homework or something el... (by Handy Andy)
Timer with an add 30 second function
 
Hi I am trying to add a function that adds thirty seconds times the user inputted value. For instance if the users inputs 1 then it only adds thirty seconds. If...
[4 replies] Last: [quote=salasranthony]@lastchance but the program is supposed to begin ... (by lastchance)
Large num
 
From geeksforgeeks i found (a * b) % m = ((a % m) * (b % m)) % m also (a / b) % m may NOT be same as ((a % m)/(b % m)) % m
[5 replies] Last: @TheTimes No i am also getting 1 case wrong. (by Dum)
Is my Diff. Eq. plot correct? d2x/dt2.
 
So, I'm relatively new on c++ and maths, don't laugh at me :(, but i made a derivative function and a d^2/dt^2 Diff. Eq. function for the derivative function, i...
[15 replies] Last: Just wanted to say i have not ignored the replies, but i don't know mu... (by SophiaCristina)
by Ashh
maximum and minimum between loops
 
Why I can't run the program after comparing maximum and minimum after each loops? What is the right way to do them? int maxFee=0,minFee=100000, TpricePT3tax, T...
[2 replies] Last: @Peter87 In the main program, there is if else statement. TpricePT3tax... (by Ashh)
Help needed with operators in Windows Studio
 
Hello, everyone! I recently started reading up on some code about 3 weeks ago. I've been slowly making my way through my textbook without too much difficulty. I...
[4 replies] Last: Thank you all for the quick responses! I couldn't find where in my boo... (by dedwards100597)
help please! rpg making rooms
 
Write your question here. #include <iostream> #include <string> using namespace std; class Hero{ public: int Lrow; int Lcol; }; class Ro...
[2 replies] Last: yes i know, this was given code. i thought the same thing as well (by YeetParadox)
RC4 Encrypt Binary Data
 
I am trying to read in the contents of an entire file into a string then use the class someone else has written to RC4 encrypt the data. This works fine when te...
[6 replies] Last: Ok, hopefully last issue. When I compare the original file to the decr... (by michaelwilliams6511)
input string and integer on the same line
 
Hello, I trying to write program, but I have a problem. At first I have to input how many people information I want to write and after I have to input informat...
[1 reply] : use getline, then iterate it in reverse. whatever is left is the name... (by jonnin)
by Ashh
Second loop isn't working properly
 
On the second loop, it should allow us to enter Individual Subject code but it directly showed the output without allowing me to enter the Individual Subject Co...
[5 replies] Last: @Ashh, you were so busy posting voluminous amounts of code in FOUR sep... (by lastchance)
by Ashh
won't stop looping for the second registration and max min aren't working
 
Write your question here. #include<iostream> #include<cstring> #include<iomanip> using namespace std; int main() { char studentName ; char schoo...
[4 replies] Last: else { cout<<"Error!"; } user++; while(registration=='Y'); return ... (by Ashh)
Prime Numbers
 
So I've wrote a simple algorithm below to test for prime numbers, a prime number must only have two divisors itself and 1, so if we loop through all the numbers...
[14 replies] Last: thanks dutch (by adam2016)
Need help with fltk tutorial
 
I tried to dive into event-driven programming with fltk. There is a tutorial for writing a simple text editor( https://www.fltk.org/doc-1.3/editor.html ). But ...
[1 reply] : So specifically which part is not working? Is the program not compilin... (by Ganado)
by aligh
Please explain the code snippet
 
The following code snippet is from a C++ text book. The goal is to understand what is going on. void send(int ∗to, int ∗from, int count) //Duff ...
[19 replies] Last: Kudos for finding a reference to this. To think I was a young programm... (by Niccolo)
June 2019 Pages: 1... 7891011... 13
  Archived months: [may2019] [jul2019]

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