Advertisement
saira12tabassum19

Untitled

Jul 9th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. //problem no 5
  2. #include<stdio.h>
  3. int main()
  4. {
  5. int arr[100],i;
  6. for(i=0;i<10;i++)
  7. {
  8. scanf("%d",&arr[i]);
  9. if(arr[i]>5&&arr[i]<10)arr[i]=1;//if arr[i] greater than 5 and less then 10then replace that number by 1
  10. }
  11. for(i=0;i<10;i++)
  12. {
  13. printf("%d ",arr[i]);
  14. }
  15.  
  16.  
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement