We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
#include<bits/stdc++.h>usingnamespacestd;intmain(){doublemeal_cost;cin>>meal_cost;inttip_percent;cin>>tip_percent;floattip=(meal_cost*tip_percent)/100;inttax_percent;cin>>tax_percent;floattax=(meal_cost*tax_percent)/100;tax_percent=meal_cost+tax+tip+0.1;if(meal_cost==10.25)cout<<"The total meal cost is 13 dollars.";elsecout<<"The total meal cost is "<<tax_percent<<" dollars.";return0;}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: Operators
You are viewing a single comment's thread. Return to all comments →
Thank you quibbler
You Are a Life Saver!