Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- // IMPLEMENTAR DOS FUNCIONES, la primera debe cargar un vector de 4 componentes enteras
- // la segunda funcion debe determinar cuantas componentes mayores a 10 hay
- int main()
- {
- // DEFINIR EL VECTOR
- int numeros[4];
- cargar_vector(carga[4]);
- int cantidad_mayores = mayores(numeros[4]);
- printf("%i",&cantidad_mayores);
- }
- void cargar_vector(int carga[4]) {
- int inicio;
- for inicio =0; inicio<4;inicio++); {
- printf("Ingresa el sueldo:");
- scanf("%i",&numeros[inicio])
- }
- }
- int mayores(int numeros[4]) {
- int inicio = 0;
- int contador =0;
- for (inicio=0; inicio<4; inicio++)
- {
- if (numeros[inicio] > 10)
- {
- contador++;
- } else {
- // SI ENTRA ACA NO HACE NADA
- }
- }
- return contador;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement