Beginners - June 2018 (Page 12)

Help me to solve TLE
 
Problem Statement After learning sieve of Eratosthenes, Deepak wants to play more with the primes. This time he is trying to print primes between two integers....
[no replies]
by Wolff
List of shared_ptr
 
Hi, I'm trying to learn about lists and shared pointers, and for that I'm trying to write this program as an excersize. The program should return "Gel" five tim...
[2 replies] Last: Thank you so much! I know shared pointers aren't necessary but that's ... (by Wolff)
Results deleting. Any solution?
 
Hello. I dont really understand why is my old results deleting from result file. I think that function void deletes it but why? Can someone explain why and how ...
[8 replies] Last: @keskiverto My bad (by H00G0)
How to find the biggest difference between two numbers using for loop
 
Hello, I need help with my C++ code. Specifically this part below. I'll need to enter 3 numbers, for example, 49.96, 49.87, 49.80 and I need to find the biggest...
[1 reply] : 49.96 - 49.80 == 0.16 #include <iostream> #include <cmath> #incl... (by JLBorges)
New to C++
 
I am lost and very new to this, what do I, x, and y equal and how do you work it out? int I = 0; int x = 0; int y; while(i<3){ x = x+5; i++; ...
[2 replies] Last: int I = 0; // I is 0 int x = 0; // x is 0 int y; // You declare this... (by fiji885)
Triggering an output statement once at the bottom of a loop
 
Just looking at my main function and my output_warning function. Basically if the temp is greater than 50 or the windSpeed is greater than 0 and less than or e...
[4 replies] Last: Made the changes and compiling with no errors or warnings. Thank you ... (by passiontrip)
by mim97
Input three integers a, b, and c. Calculate and output Result using the following formula:
 
Question: Input three integers a, b, and c. Calculate and output Result using the following formula: Result= √(b^|a+c| )/2ab Note: | | is the operato...
[4 replies] Last: Thankyou! it worked. (by mim97)
by mim97
You want to rate a mobile phone, according to the following conditions:
 
Question: You want to rate a mobile phone, according to the following conditions: (i) Price should be less than 1500 AED. (ii) Screen size should be at leas...
[2 replies] Last: oops i didnt notice that! thankyou so much i appreciate it. (by mim97)
How to Design an Algorithm?
 
This may be a very open ended question, but I am learning algorithms for the first time. I have been given the problem "Find two largest elements in an array wi...
[11 replies] Last: That is correct, I was wrong. I believe a simple 1 2 3 4 5 6 is ... (by jonnin)
Grid problem - Urgent
 
Super Mario wants to save the princess but this time the tasks are not easy. So he asked you to help him so he can save her. Mario is in a Castle. The castle i...
[3 replies] Last: Guess it's not that urgent. ¯\_(ツ)_/¯ (by Ganado)
Bin folder to debug folder:
 
I am trying to setup a Microsoft visual 2017 project - I am confuse when it says to copy all contents from "SFML" bin folder to my debug project Microsoft visua...
[3 replies] Last: When you download sfml and peek inside you should find a folder named ... (by Manga)
Make File Error- $(CPP) $(LINKOBJ) -o $(BIN) $(LIBS)
 
# Project: Project2 # Makefile created by Dev-C++ 5.11 CPP = g++.exe CC = gcc.exe WINDRES = windres.exe OBJ = QualityGovernanceWithWindo...
[1 reply] : Please do not post duplicates. http://www.cplusplus.com/forum/windows/... (by kbw)
by gdz98
Jumping into C++ cha 17 number 1 (binary tree and sorting)
 
Hi guys I m going trough the Jumping into C++ book and im currently on the binary tree chapter. There s an exercise that tells me to write a code where I can ad...
[3 replies] Last: This is what I currently have: #include <iostream> using namespace ... (by gdz98)
Longest common prefix (1,2)
 
https://www.codechef.com/JUNE18B/problems/SHKSTR My code #include <bits/stdc++.h> using namespace std; vector<pair<int, string>> coll; bool sortB...
[39 replies] Last: @ihavenoname, ihave sorted the queries according to R and and keep on ... (by Maanas)
Help please : problem with char[32]
 
Hi everyone! I'm new to C++ and I'm struggling on this very small program. #include <iostream> int main() { char str1 ; std::cout<<"What your name...
[6 replies] Last: Thank you everyone for helping me! 🙂 (by JuicyLime)
Oceans in millimeters program
 
I'm trying to write a program to export an ocean's level using 1.5 millimeters as the current variable. Then I need to show what the ocean's level will be at 5,...
[7 replies] Last: Here is the final product. Thanks for the help. // If the ocean’s l... (by grider67)
Please help
 
I'm having a problem with a program I have to write for an introductory c++ class. The description for the assignment is: "Write a program that inputs a tim...
[1 reply] : Nevermind, I just did it mathematically. hours = time / 10000; time =... (by fkenney719)
Trying to look at all my posting and answer
 
how can I find all my Question& Answer?
[1 reply] : Click on My topics (http://www.cplusplus.com/forum/myposts.cgi ) on... (by Peter87)
c - determining genders in a file
 
So, I'm a bit stuck here. I'm supposed to make a program which will read data from a file to determine how many female and male adults of legal age exist in th...
[2 replies] Last: I would read the file like this: #define _CRT_SECURE_NO_WARNINGS #i... (by Thomas1965)
Simple program, need a little help
 
Here is my program : #include <iostream> #include <ctime> #include <cstdlib> using namespace std; int main() { int a, b, c, d, e, f; cout << "T...
[5 replies] Last: Well, here is something for you to play around with. You will need to... (by Manga)
June 2018 Pages: 1... 1011121314... 19
  Archived months: [may2018] [jul2018]

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