Beginners - January 2019

Code for numerical differentiation doesn't work?
 
I am having some problems with my code on numerical differentiation. We are supposed to use the two point, three point, four point, and five point formulas to f...
[4 replies] Last: Agree with @dhayden: h1 and h2 are missing from the denominators in t... (by lastchance)
For loops are looping me.
 
If anyone remembers, I am the same person who said the way of teaching C++ in my country is outdated and uninteresting. Now for loops are confusing me. The w...
[6 replies] Last: Don't download turbo c++. Why on earth would you? Not like we get home... (by Grime)
How to define 0/0 equal to 0.
 
Hello Friends In my cpp code, one of my iteration is giving result of 0/0, I want to convert 0/0 to zero. So that value could be used for further operations. S...
[6 replies] Last: ^ Was just about to say, why should 0/0 be 0? In many cases, it would ... (by Ganado)
Make a table for each value of I (loop)
 
Hi, I have to implement a code that uses two different approximations of the integration of a function and compares them by using the deviation between them. ...
[6 replies] Last: You don't need an array to store the results - just use formatted ou... (by lastchance)
Calculator doesn't work
 
Is there a problem with my code? It is supposed to be a calculator with 3 operators only. It's for an assignment. #include <iostream> using namespace std...
[2 replies] Last: In case you don't get it, in your if statements, you can't use a singl... (by H00G0)
by AA360c
Vector of vector
 
hello everyone, i wanna make a vector of vector with no definite row and column, i mean the row and column must cin by user, or a stream file. okay, how shou...
[5 replies] Last: Hey Grime, However those posts were almost similar to each other, But ... (by AA360c)
Reading lines of input
 
I got a problem. I need to allow a user to make one input and it assigns the numbers to variables. Afterwards, it computes the sum. So if I input "1 2 3", it wi...
[9 replies] Last: Lol I found that really funny XD. I love you for that reply bulba! B... (by Grime)
Overthrown exception help
 
Hello everyone, This is a game of life lab due in a few hours and I have encountered an "overthrown exception" problem in visual studio. Can someone please t...
[4 replies] Last: Stop starting new threads for the exact same topic. You haven't even f... (by dutch)
by yat89
reversing number
 
Hi everyone. I got a task to reverse number from index 2 to 5 for each row. I had try with the code but the solution wont appear. I dont know either i do right ...
[12 replies] Last: Hi Jonnin , I had try the code on a new compiler which is Visual Stud... (by yat89)
need help with c++ guessing game
 
Write your question here. // GuessingGame.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include "pch.h" ...
[5 replies] Last: Yes, like that. Okay, let's simplify your logic a bit, and also use a... (by Ganado)
Having an issue with an array
 
Hey there, so when I'm trying to get a value from my array using a variable, it prints out 0 no matter the variable value, although when I put a value in the ar...
[15 replies] Last: #include <iostream> #include <sstream> #include <string> #include <ct... (by lastchance)
Homework help!
 
Write a program that asks the user to input •The number of gallons of gas in the tank •The fuel efficiency in miles per gallon •The price of gas per ga...
[5 replies] Last: Ganado I sent you a PM. (by advancedip)
uso de multi
 
Hello juanmanuel5454, PLEASE ALWAYS USE CODE TAGS (the <> formatting button), to the right of this box, when posting code. It makes it easier to read your c...
[2 replies] Last: No, someone is probably just abusing the report function, fancying h... (by Ganado)
Urgent
 
I'm new to the C++ programming world, and I'm not even doing this for homework... I need urgent help, but for now all I need is a code to allow the robot to mov...
[2 replies] Last: c++ is not aware of arduino. Arduino speaks a dialect of near c++ but... (by jonnin)
Function Search
 
can you help me guys on how to edit the sample codes based on the requested things below? Thankss ☺☺ #include <iostream> #include <cstddef> #include <str...
[1 reply] : So what have you thought about (other than posting code online). I me... (by salem c)
Urgent
 
Hello,can anyone please help me with the following task and probably write a possible solution.Here is the task. We have a rectangular matrix GRID consisting o...
[4 replies] Last: Well I missed the deadline but then I sat down and wrote the code. I a... (by gabrinka)
Adding a "enter q to quit" for a calculator
 
I can't for the life of me figure out how to get the "enter Q to quit" to work properly. I don't know if I am allowed to do it this way, but can someone guide m...
[1 reply] : while ( true ) { cout << "Select Math Operator(+, -, /, *, %)... (by lastchance)
by cash
perm_identity Estimating the value of Pi using Monte Carlo
 
This code is not giving me a value, I need some help to whatI'm doing wrong. #include <iostream> #include <ctime> #include <cstdlib> #include <cma...
[1 reply] : Why would you pick RAND_MAX as your loop limit? That's bizarre. Try so... (by dutch)
by kmce
Stack/Heap knowing when to allocate to what
 
Hi, I am currently learning about stack/heap, and reading some posts it seems that most say, you use the stack if you know how much data needs allocated, and th...
[4 replies] Last: Hi, One can achieve a lot by just using the STL, and don't worry abou... (by TheIdeasMan)
How to retrieve multiple variables using a while loop
 
I have a challenge from a friend where I need to translate "pirate" phrases into english. For example, arr = hello I wrote down the list of the pirate wor...
[7 replies] Last: Okay then you've got to use string::replace and string::find like Jonn... (by Grime)
January 2019 Pages: 123... 17
  Archived months: [dec2018] [feb2019]

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