Jump to content
Fórum Script Brasil
  • 0

codigo simples mais não consigo distinguir as vairiaveis, se coloco y&


felipeluiz

Question

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
float x,y,preço;
cout<<"digite o valor do produto: ";
cin>>x;
cout<<"digite a venda mensal media: ";
cin>>y;
if((y<500)||(x<30))
{
preço=x+(x*0.1);
cout<<"o novo valor do produto e: "<<preço<<endl;
}
if((y>=500&&y<1200)||(x>=30&&x<80))
{preço=x+(x*0.15);
cout<<"o novo preço e: "<<preço<<endl;
}
if((y>=1200)||(x>=80))
{preço=x-(x*0.2);
cout<<"o valor do produto foi reduzido para: "<<preço<<endl;
}
system("pause");
}
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652.1k
×
×
  • Create New...