program that takes Time and show it in seconds

visual studio

#include <cstdlib>
#include <iostream>

using namespace std;
struct time
{
int hours;
int minutes;
int seconds;
};
int main(int argc, char *argv[])
{
struct time t;
cout<<“Enter hours\n”;
cin>>t.hours;
cout<<“Enter minutes\n”;
cin>>t.minutes;
cout<<“Enter seconds\n”;
cin>>t.seconds;

cout<<“\n \nhours:minutes:seconds\n”<<t.hours<<“:”<<t.minutes<<“:”<<t.seconds<<endl;
long totalsecs =t.hours*3600 + t.minutes*60 + t.seconds;
cout<<“\n Total number of seconds are :”<<totalsecs<<endl;
system(“pause”);
return 0;
}

Your comment are valueable