please help me in finding out the mistake i had done in this code ? i am continuously getting as “wrong answer” when i submit the solution, though i am able to get all outputs given in question correctly!
#include <stdio.h>
int main(void) {
// your code goes here
int t;
scanf("%d",&t);
long int p,q;
while(t--){
scanf("%ld %ld", &q,&p);
if(q>1000){
double k = (float)p*(float)q*9/10;
printf("%lf\n", k);
}else if(q<=1000) {
double k= (float)p*(float)q;
printf("%lf\n",k);}
}
return 0;
}
Thanks in advance