Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- float n;
- int K;
- int main()
- {
- cout << "podaj wielkosc nakladu: " << endl;
- cin >> n;
- if (n != ceil(n) || n <= 0){
- K = 0;
- cout << "wartosc zamowienia wynosi: " << K <<endl;
- }
- else if (n > 1000){
- K = 10 * n;
- cout << "wartosc zamowienia wynosi: " << K << endl;
- }
- else if (n >= 500 && n <=1000){
- K = 12 * n;
- cout << "wartosc zamowienia wynosi: " << K << endl;
- }
- else {
- K = 15 * n;
- cout << "wartosc zamowienia wynosi: " << K << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment