Write a program in c to increment one second to current time
Answers
Answered by
0
The question is anonymous for me and not that much clear to me.
But I will try to help you.
You can create a outer loop for minutes and inner loop for seconds.
Pseudo code :
Int minute,hour,second;
For(int I =0;I<60;I++) //for minutes
{
For(int J=0;J<60;J++) //for seconds
{
If(J==60)
{Minute++;}
Else
{Continue;}
}
If(I==60)
{Hour++;}
Else
{Continue;}
}
I hope this will help you.
But I will try to help you.
You can create a outer loop for minutes and inner loop for seconds.
Pseudo code :
Int minute,hour,second;
For(int I =0;I<60;I++) //for minutes
{
For(int J=0;J<60;J++) //for seconds
{
If(J==60)
{Minute++;}
Else
{Continue;}
}
If(I==60)
{Hour++;}
Else
{Continue;}
}
I hope this will help you.
Similar questions
English,
7 months ago
Social Sciences,
7 months ago
English,
7 months ago
History,
1 year ago
Political Science,
1 year ago