Computer Science, asked by shivanijilukara, 8 months ago

Arun wants to buy a shirt. As he is very lazy, he decided to buy the shirt online. He chooses a shirt in Flipkart and is surprised to see the same shirt in Amazon and Snapdeal as well. So he decided to buy the shirt from the website which offers it at the least price. The price of the shirt, discount % and the shipping charges of all three websites have been given as input. Help him in calculating the price of the shirt in each website and decide which website has the lowest price.

Answers

Answered by bhargav0606
0

Answer:

to decide inputs must be given

Explanation:

so make another question including inputs

you will then get the answer

Answered by gauravfeel
0

Answer:

#include<iostream>

using namespace std;

int main()

{

 int fa,fd,fs,sa,sd,ss,aa,ad,as, zf,zs,za;

 cin>>fa>>fd>>fs>>sa>>sd>>ss>>aa>>ad>>as;

 zf=fa-(fa*fd*0.01)+fs;

 cout<<"In Flipkart Rs."<<zf;

 zs=sa-(sa*sd*0.01)+ss;

 cout<<"\nIn Snapdeal Rs."<<zs;

 za=aa-(aa*ad*0.01)+as;

 cout<<"\nIn Amazon Rs."<<za;

 if(za>=zs & zs<zf)

 {

  cout<<"\nHe will prefer Snapdeal";

 }

 else if(zf<=zs & za>=zf)

 {

  cout<<"\nHe will prefer Flipkart";

 }

 else if(za<=zf & za<=zs)

 {

  cout<<"\nHe will prefer Amazon";

 }

}

Explanation:

where fa= flipkart amount

fd = flipkart discount;

fs= flipkart shipping;

and so on for snapdeal and amazon.

and zf,zs,za is total cost respectively

Similar questions