Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Samosa
//g++ 7.4.0 //note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; #include <iostream> using namespace std; class Samosa{ float price; public: Samosa(float p) { price = p;} float total() { return (2*price);} }; int main() { Samosa sakal(5.5); //functional initialization Samosa bikal = 10.0;//assignment initialization Samosa sham {20};//uniform initialization Samosa dopahar = {15.5};//POD-like initialization cout<<"Morning samosa costs Tk "<<sakal.total()<<endl; cout<<"Noon samosa costs Tk "<<dopahar.total()<<endl; cout<<"Afternoon samosa costs Tk "<<bikal.total()<<endl; cout<<"Evening samosa costs Tk "<<sham.total()<<endl; return 0; }
run
|
edit
|
history
|
help
0
Full System Specifications
Complete Over-Use of Functor Templates (Academic Experiment)
Graph Theory On Strings
Microsoft - MaxEmployeeAttendence (R repititions - DP solution bitmask)
ADP_campus
Test 14(2020)
pm zn moer 2.0
Sortowanie przez scalanie
good triplet
series