fork download
  1. #include<stdio.h>
  2.  
  3. int main(){int i;
  4. int count=0;
  5.  
  6.  
  7. printf("Enter a number upto which u want to count:");
  8.  
  9. scanf("%d",&i);
  10. for(count<=i;count++;){printf ("%d\n", count);
  11. }
  12. }
Success #stdin #stdout 0.01s 5328KB
stdin
45
stdout
Enter a number upto which u want to count: