fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int qty,price,amount,discount,total;
  5. scanf("%d%d",&qty,&price);
  6. amount=qty*price;
  7. if(amount>5000)
  8. {
  9. discount=amount*0.2;
  10. total=amount-discount;
  11. {
  12. else
  13. }
  14. discount=0;
  15. total=amount-discount;
  16. }
  17. printf("%d",total);
  18. return 0;
  19.  
  20.  
  21.  
  22.  
  23. }
  24.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
32
53
compilation info
prog.c: In function ‘main’:
prog.c:12:2: error: ‘else’ without a previous ‘if’
  else
  ^~~~
stdout
Standard output is empty