Tagged: program using constructor

Interested in learning C Programming? Click here...


Cpp Program 0

C++ program using two constructor to calculate minutes and seconds with hour as input from user

Write a class with name Time. Make a constructor which calculates the given time in minutes {if input time is 1hr, then the constructor should return 60minutes. }. Make another constructor which calculates the time in seconds. { if the input time is 1hr, then the constructor should return 60*60=3600 seconds}. Display the contents of both the constructors

Output