Respostas

2013-09-23T13:32:12-03:00
#include <stdio.h>
#include <stdlib.h>

#define n 5

main ()
{int vector[n],i,icontpar=0,isoma=0, icontimpar=0;int aux_vector[n];int j=0;
for(i=0;i<n;++i)
{ printf("Digite a %d posicao: ",i); 
scanf("%d",&vector[i]); if((vector[i] % 2)==0)
{  icontpar++;  isoma += vector[i];} 
else{ icontimpar++; isoma += vector[i]; 
aux_vector[j] = vector[i]; j++; } }j--;
do{    printf("\n\n ultimos impares digitados:" );   
printf("%d\n", aux_vector[j]);    j--;}
while (j!=-1);

getchar();
getchar();}