Java Program to add time and display result in hr,minute and second. Get link Facebook X Pinterest Email Other Apps - July 27, 2019 Code: Output: 36HoursMinutes1Seconds2 Get link Facebook X Pinterest Email Other Apps Comments
C++ programming toll plaza simulation program - September 18, 2018 So the code is; #include<iostream> using namespace std; #define Toll=10.50 #define ESC=27 class tollplaza { private: int totalcar; double totalcash; public: tollplaza() { totalcar=0; totalcash=0.0; } void payingcar() { totalcash=totalcash+Toll; totalcar=totalcar+1; } void nonpayingcar() { totalcar++; } void printcardetail() { cout<<"totalcash"; cout<<"totalcar"; } }; int main() { tollplaza plaza1; char ch; cout<<"Press 0 for no pay car\nPress 1 for pay car\nPress ESC to exit program"; do { cin>>ch; if(ch=='0') { plaza1.nonpayingcar(); } else if(ch=='1') { plaza1.printcardetail(); } } while(ch!=ESC); ... Read more
Object Array in C++ - September 02, 2019 Object array can be made in C++ by the following syntax: Class name variable name[size] ={object1,object 2,....,objectn}; Example: Read more
Comments
Post a Comment
Feel free to leave a comment...