Advertisement
hamaXD

NOT complete 01

Sep 29th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5.     int i,j,x,c[]={0};
  6.     printf("Size A :");
  7.     scanf("%d",&x);
  8.  
  9. printf("-----------\n");
  10.     int a[]= {0};
  11.  
  12.    
  13.     for(i=0;i<x;i++){
  14.     printf("Enter set A%d :",i+1);
  15.     scanf("%d",&a[i]);
  16.     }
  17. printf("-----------\n");
  18.    
  19.  
  20.     printf(" A  = {");
  21.     for(i=0;i<x;i++){
  22.         if (i==x-1){
  23.         printf("%d",a[i]);
  24.         }
  25.         else{
  26.         printf("%d,",a[i]);
  27.         }
  28.     }
  29.         printf("}\n");
  30. printf("-----------\n");
  31.    
  32.    
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement