#include<iostream>
using namespace std;
struct time_struct
{
int hour,minute,second;
};
int main()
{
time_struct st;
cout<<"Enter hour";
cin>>st.hour;
cout<<endl;
cout<<"Enter minute";
cin>>st.minute;
cout<<endl;
cout<<"Enter second";
cin>>st.second;
cout<<endl;
cout<<"The time is :- "<<st.hour<<": "<<st.minute<<": "<st.second;
return 0;
}
using namespace std;
struct time_struct
{
int hour,minute,second;
};
int main()
{
time_struct st;
cout<<"Enter hour";
cin>>st.hour;
cout<<endl;
cout<<"Enter minute";
cin>>st.minute;
cout<<endl;
cout<<"Enter second";
cin>>st.second;
cout<<endl;
cout<<"The time is :- "<<st.hour<<": "<<st.minute<<": "<st.second;
return 0;
}
Hey my name is Neeraj and i have blog which is related to c++ programming. I want to exchange link between us. If you are interested than let me know. My blog url is cpp-programs.blogspot.com and my email is sareneeru94@gamil.com
ReplyDelete