Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. int main(){
  3.     int i=0,j=0,notas[100]={0},soma=0,pares[100]={0};
  4.  
  5.     for(i=0;i<100;i++){
  6.         notas[i]=i+1;
  7.     }
  8.  
  9.     for(i=0;i<100;i++){
  10.         printf("%d\n",notas[i]);
  11.     }
  12.  
  13.     j=0;
  14.     for(i=0;i<100;i++){
  15.         if(notas[i]%2==0){
  16.             pares[j]=notas[i];
  17.             j++;
  18.         }
  19.     }
  20.  
  21.  
  22.     for(i=0;i<100;i++){
  23.         printf("%d\n",notas[i]);
  24.     }
  25.  
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement