Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class Rachunek {
- public:
- string nazwa_sklepu; int podatek; float cena; string nazwa_produktu;
- void wyswietl(){
- cout<<"Nazwa sklepu: "<<nazwa_sklepu<<endl;
- cout<<"Podatek: "<<podatek<<endl;
- cout<<"Cena: "<<cena<<endl;
- cout<<"Nazwa produktu: "<<nazwa_produktu<<endl;}
- void oblicz(){
- float brutto;
- brutto=cena+(cena*podatek)/100;
- if(cena<=100){
- cout<<"Produkt zwolniony z VATu";
- }
- else{
- cout<<"Cena brutto: "<<brutto;
- }
- }
- };
- int main()
- {
- Rachunek sklep;
- sklep.nazwa_sklepu="Asioland";
- sklep.podatek=23;
- sklep.cena=320.20;
- sklep.nazwa_produktu="Odkurzacz Vacuum";
- sklep.wyswietl();
- sklep.oblicz();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement