Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Discounts on the Prices V2
- //by: Cyb3rDoctor
- #include<iostream>
- #include<iomanip>
- using namespace std;
- int main() {
- double n,price=0,sum=0;
- cin>>n;
- for (int i=1 ; i<=n ; i++)
- {
- cin>>price;
- if (price>=10)
- sum=sum+price*0.15;
- }
- cout<<"the total amount of money lost = "<<sum;
- return 0; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement