fork download
  1. #include<stdio.h>
  2. main()
  3. {
  4. int i,j,k,x;
  5. printf("enter the pyramid value = \n");
  6. scanf("%d",&x);
  7. for(i=x-1;i>0;i--)
  8. {
  9. printf(" ");
  10. }
  11. for(j=1;j<=x;j++)
  12. {
  13. printf("%d ",j);
  14. }
  15. for(k=i;k>1;k--)
  16. printf("\n");
  17. }
  18. }
  19.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:3: warning: return type defaults to ‘int’
prog.c: In function ‘main’:
prog.c:6: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
prog.c: At top level:
prog.c:18: error: expected identifier or ‘(’ before ‘}’ token
stdout
Standard output is empty