where is the error?

atm beginner problem solution:

#include<stdio.h>
int main()
{
int x;
float y;
scanf("%d%f",&x,&y);
if(x%5==0&&y)
printf(".2f",y-(float)x-0.50); else printf(".2f",y);
}

i am getting compilation error:

gcc -c -pipe -O2 test.adb
test.adb:1:01: illegal character
test.adb:3:01: illegal character, replaced by “(”
test.adb:7:28: missing string quote
test.adb:11:01: illegal character, replaced by “)”
gnatmake: “test.adb” compilation error


include<stdio.h>

int main()
{

  int x;
 float y; 
 scanf("%d%f",&x,&y); 
 if(x%5==0 && y) 
     printf("%.2f",y-(float)x-0.50); 
 else 
     printf("%.2f",y);

}

P.S. : please post the code by selecting the code snippet option while posting

I think the problem is here

y-(float)x-0.50)