Advertisement
PROFESSOR_AIH

Array fill I

Apr 16th, 2022
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int arr[10],i,num;
  5.     scanf("%d",&num);
  6.     printf("N[0] = %d\n",num);
  7.     for(i=1;i<10;i++)
  8.     {
  9.         printf("N[%d] = %d\n",i,(num=num*2));
  10.     }
  11.     return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement