Advertisement
janducev

Untitled

Oct 21st, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main () {
  5.  
  6.  
  7. int sumatotal = 0;
  8. int multiplicaciontotal = 1;
  9. int tmp;
  10.  
  11. int numeros[10];
  12.  
  13. for(int i=0;i<10;i++){
  14. printf("Dame 1 numero\n");
  15. scanf("%d",&tmp);
  16. getchar();
  17.  
  18. numeros[i] = tmp;
  19. }
  20.  
  21. for(int i=0;i<10;i++){
  22. sumatotal += numeros[i];
  23. multiplicaciontotal *= numeros[i];
  24. }
  25.  
  26.  
  27. printf("La suma total es %d\n La mult total es %d\n",sumatotal,multiplicaciontotal);
  28.  
  29. getchar();
  30. return(0);
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement