Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. main()
  3. {int valores[100],n,cont;
  4. n=0;
  5. do{
  6. printf("Introduza um numero:");
  7. scanf("%d",&valores[n]);
  8. n=n+1;
  9. }
  10. while(valores[n-1]!=0);
  11. for(cont=0;cont<n-1;cont=cont+1){
  12. if(valores[cont]%2==0){
  13. printf("%d\t %d\n",valores[cont],valores[cont]*2);
  14. }
  15. else{
  16. printf("%d\t %d\n",valores[cont],valores[cont]);
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement