fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int n;
  5. printf("Enter the number: ");
  6. scanf("%d",&n);
  7. float f=100;
  8. for(int i=1;i<=n;i++){
  9. printf("%f ",f);
  10. f=f/2;
  11. }
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 5312KB
stdin
5
stdout
Enter the number: 100.000000 50.000000 25.000000 12.500000 6.250000