Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- #include <iostream>
- using namespace std;
- int main()
- {
- int a;
- float b,c,d;
- string e;
- cout<<"podaj cene towaru : "<<endl;
- cin>>a;
- cout<<"czy to towar dla dzieci? wpisz tak:"<<endl;
- cin>>e;
- if(a<200)
- {
- b=0;
- }
- else
- {
- if(a>200&&a<1000)
- {
- b=0.15;
- }
- else
- if(a>1000)
- {
- b=0.22;
- }
- if(e=="tak")
- {
- b=0.05;
- }
- }
- c=a*b;
- d=a-c;
- cout<<"Cena towaru po odjeciu podatku:"<<d<<endl;
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement