riojuan

Untitled

Feb 22nd, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main () {
  4.  
  5.    int x[ 10 ]; /* n adalah array yang memiliki nilai 10*/
  6.    int i,j;
  7.  
  8.       for ( i = 0; i < 10; i++ ) {
  9.       n[ i ] = i + 100;
  10.    }
  11.    
  12.       for (j = 0; j < 10; j++ ) {
  13.       printf("Elemen[%d] = %d\n", j, x[j] );
  14.    }
  15.  
  16.    return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment