Dev - C++ - ayuda por favor, me sale [error] id returned 1 exit status

 
Vista:
sin imagen de perfil

ayuda por favor, me sale [error] id returned 1 exit status

Publicado por jhonatan (1 intervención) el 16/12/2019 07:30:28
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include<iostream>
#include<stdlib.h>
using namespace std;
int size=100;
int *arreglo=new int[size];
int f_acum=0;
int acum=0;
 
void getsize();
void getdata();
int getmayor();
int getsuma(int f_mayor,int f_acum);
void getmostrar(int f_mayor,int f_suma);
 
int main(){
	int mayor=0, suma=0;
	getsize();
	getdata();
	mayor = getmayor();
	suma = getsuma(mayor,acum);
	getmostrar(mayor, suma);
	return 0;
}
void getsize(){
	cout<<"ingrese el tamano del arreglo: ";
	cin>>size; system("cls");
}
void getdata(){
	for(int i=0; i<size; i++){
		cout<<">> ingrese valor del arreglo["<< i <<"] : ";
		cin>>arreglo[i];
	}
	system("cls");
}
int getmayor(){
	int f_mayor=0;
	for(int i=0;i < size; i++){
		if(arreglo[i] > f_mayor){
			f_acum += arreglo[i];
		}
	}
	return f_acum;
}
void getmostrar(int f_mayor, int f_suma){
	cout<<"# ARREGLO '"<< size <<"'"<<endl<<endl;
	for(int i=0;i<size; i++){
		cout<<"\tvalor del arreglo["<< i <<"] : "<<arreglo[i] <<endl;
	}
	cout<<endl;
	cout<<"# mayor numero : " << f_mayor <<endl;
	cout<<"# suma hallada : " <<f_suma<<endl<<endl;
	cout<<"# arreglo'"<<size<<"' MODIFICADO"<<endl <<endl;
	for(int i=0;i <size; i++){
		if(i % 2 == 0){
			arreglo[i]= f_suma;
		}
		cout<<"\tvalor del arreglo["<< i <<"] : "<<arreglo[i]<<endl;
	}
 
}
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de Alfil
Val: 4.344
Oro
Ha mantenido su posición en Dev - C++ (en relación al último mes)
Gráfica de Dev - C++

ayuda por favor, me sale [error] id returned 1 exit status

Publicado por Alfil (1444 intervenciones) el 16/12/2019 10:09:02
Te da el error porque te falta implementar la función:

1
int getsuma(int f_mayor, int f_acum);
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar