SHARE
TWEET

Untitled

a guest Nov 20th, 2019 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int a[10],i,count=0,j,b[10];
  5.     printf("Imput 10 integer number:\n");
  6.     for(i=0;i<10;i++)
  7.     {
  8.         scanf("%d",&a[i]);
  9.     }
  10.     for(i=0;i<10;i++)
  11.     {
  12.         if(a[i]>=3&&a[i]<=7)
  13.         {
  14.             count++;
  15.            
  16.         }
  17.      
  18.        
  19.     }
  20.     for(i=0;i<10;i++)
  21.     {
  22.         if(a[i]>=3&&a[i]<=7)
  23.         {
  24.            for(j=count;j>=1;j--)
  25.            {
  26.                b[j]=a[i];
  27.            }
  28.            
  29.         }
  30.      
  31.        
  32.     }
  33.     for(j=0;j<count;j++)
  34.     {
  35.        
  36.      printf("%d ",b[j]);
  37.        
  38.     }
  39.     return 0;
  40. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top