Questions tagged as 'c++'

1
answer

id returned 1 exit status in C

My code gets this error and I do not know what's wrong: #include<stdio.h> // printf, scanf // Função principal int main(void) { // início do programa principal // Declaração das variáveis locais unsigned int Dias; // soma total dos dias...
asked by 06.06.2016 / 00:31
1
answer

Loop End Error (Bug delete with char *)

1 - I have this code (I gave a summary, type -1, and then 'n' to exit the loop and the error occurred): #include <iostream> #include <cstdlib> #include <cstdio> #undef max using namespace std; int* cont = new int(0); //----...
asked by 13.12.2014 / 23:28
1
answer

Program to print an array with the same number of rows and columns with descending order [closed]

I need to know what a program would look like to print an array in the same way below, where the bottom line will always subtract 1 from the top number. I really tried to make a code but I did not know where to start, so I came to ask for a help...
asked by 18.11.2018 / 02:25
2
answers

Error in "break" in C ++ code prevents compilation [closed]

Follow the code below: #include <iostream> using namespace std; int main() { float n1, n2; int s; float resul; cout << "Digite um número para começar" << endl; cin >> n1; cout << "Vc que...
asked by 11.03.2018 / 21:58
1
answer

Variable type float does not receive valuation [closed]

Here's a snippet of code: #include <stdio.h> #include <stdlib.h> #define MVAIN 0.8592; #define MVAOUT 1.0282; #define ICMS 0.29; float ProdValue = 0, MVA = 0, ResultValue1 = 0, ResultValue2 = 0, ResultValue3 = 0; int main(){...
asked by 19.03.2017 / 18:33
1
answer

Runtime error, c ++, I do not know why // this is the problem (https://www.urionlinejudge.com.br/judge/pt/problems/view/2857)

#include <iostream> #include <cstring> #include <vector> #include <algorithm> using namespace std; #define MAXN 100100 //int vet[MAXN]; int N; void atualiza(int x, int v,int[],int); int soma(int x,int [],int); int main...
asked by 26.08.2018 / 14:42
0
answers

remove vowels from a string in C [closed]

   My question is about Make a program that receives the user a string. The program prints the string without its vowels.     
asked by 22.11.2018 / 17:00
1
answer

Arrays in loops

I could not solve the following question: Fill in the blanks to print all elements of a array arr containing 3 elements: for(int x=0; x<___; x++){______<<______[x]<<endl;}     
asked by 16.05.2017 / 04:16
1
answer

Complicated problem [closed]

How to do in C ++ a program that prints the user's number as follows: 5 4 3 2 1 5 4 3 2 5 4 3 5 4 5 This is very complicated for me.     
asked by 27.10.2017 / 13:59