Please can anyone help me out why my solution is not getting accepted?

Total Expenses ,Problem Code: FLOW009

#include <bits/stdc++.h>
#define z ios::sync_with_stdio(0);
#define ll long long int
using namespace std;

int main() {
z;
ll t;
cin>>t;
cout<<fixed<<setprecision(6);
float quan,price,discount=0.9;
while(t–>0)
{
cin>>quan>>price;
// ll total=0,discount=quan*0.1;
// total=quan-discount;
if(quan>1000)
{

        cout<<quan*price*discount<<"\n";
   }
   else
    cout<<quan*price<<"\n";
     
 }
return 0;

}

total price=price*quantity
if quantity>1000 then net price=total price - 10% of total price
else net price = total price

print the net price

1 Like

Please format your code next time :slight_smile:

total price=price*quantity
if quantity>1000{net price=total price - 10% of total price}
else {net price = total price}