fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int n,i,j,sp;
  5. scanf("%d ",&n);
  6. for(i=1;i<=n;i++)
  7. {
  8. for(sp=1;sp<=(i-14;sp++)
  9. {
  10. printf(" ");
  11. }
  12. for(j=n;j>=i;j--)
  13. {
  14. printf("*");
  15. }
  16. for(j=n;j>i;j--)
  17. {
  18. printf("*");
  19. }
  20. printf("\n");
  21. }
  22. return 0;
  23. }
Compilation error #stdin compilation error #stdout 0s 9424KB
stdin
4
compilation info
prog.c: In function ‘main’:
prog.c:8:21: error: expected ‘)’ before ‘;’ token
   for(sp=1;sp<=(i-14;sp++)
                     ^
prog.c:9:3: error: expected ‘;’ before ‘{’ token
   {
   ^
prog.c:21:2: error: expected expression before ‘}’ token
  }
  ^
prog.c:21:2: error: expected expression before ‘}’ token
prog.c:4:10: warning: unused variable ‘j’ [-Wunused-variable]
  int n,i,j,sp;
          ^
stdout
Standard output is empty