fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int n;
  5. printf("Enter the number: ");
  6. scanf("%d",&n);
  7. int a=4;
  8. for(int i=1;i<=n;i++){
  9. printf("%d ",a);
  10. a=a+3;
  11. }
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0.01s 5316KB
stdin
10
stdout
Enter the number: 4 7 10 13 16 19 22 25 28 31