Posts by Gabriel Neri • 11 points
3 posts
-
0
votes1
answer556
viewsQ: Doubt binary search c++
https://www.codepit.io/#/problems/5369c33df6fa9de49e5c7d0e/view? index=1 I managed to resolve this issue as follows: #include <iostream> #include <algorithm> using namespace std; int…
c++asked Gabriel Neri 11 -
1
votes2
answers522
viewsQ: Infinite loop on switch
The problem is that in all three cases, cout repeats endlessly. #include<iostream> using namespace std; #include<locale.h> int main(){ setlocale(LC_ALL, "Portuguese"); bool a; int…
-
0
votes2
answers439
viewsQ: Calculate sequence of triangular numbers smaller than 1000
I’m a beginner in programming and I’m struggling with the following problem: Make a program that calculates and prints all triangular numbers smaller than 1000. A triangular number is a natural…
c++asked Gabriel Neri 11