fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int x;
  6. float y;
  7. scanf("%d %f",&x,&y);
  8. if((x%5==0)&&(float(x)<=y-0.50))
  9. {
  10. y=y-(float)x-0.50;
  11. printf("%0.2f",y);
  12. }
  13. else
  14. {
  15. printf("%0.2f",y);
  16. }
  17.  
  18. return 0;
  19. }
  20.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
30 120.00
compilation info
prog.c: In function ‘main’:
prog.c:8:25: error: expected ‘)’ before ‘x’
     if((x%5==0)&&(float(x)<=y-0.50))
                         ^
prog.c:8:27: error: expected ‘)’ before ‘<=’ token
     if((x%5==0)&&(float(x)<=y-0.50))
                           ^
stdout
Standard output is empty