Advertisement
Sam-Sampaio

Exemplo2

May 16th, 2019
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int vetor1 [3] = {1,2,3};
  6. int i, x, j, vetor2 [3] = {};
  7.  
  8. printf("\nDigite mais 3 valores \n");
  9. for(j=0;j<3;j++)
  10. {
  11. scanf("%i", &vetor2[j]);
  12. }
  13.  
  14. printf("_________________________________________________");
  15.  
  16. for(i=0; i<3; i++) {
  17.     if(vetor1[i]==vetor2[i]) {
  18.         printf("valores são iguais:");
  19.     }
  20.    else{
  21.      printf("\n nada se repete \n");
  22.    }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement