- 001
- 002
- 003
- 004
- 005
- 006
- 007
- 008
- 009
- 010
- 011
- 012
- 013
- 014
- 015
- 016
- 017
- 018
- 019
- 020
- 021
- 022
- 023
- 024
- 025
- 026
- 027
- 028
- 029
- 030
- 031
- 032
- 033
- 034
- 035
- 036
- 037
- 038
- 039
- 040
- 041
- 042
- 043
- 044
- 045
- 046
- 047
- 048
- 049
- 050
- 051
- 052
- 053
- 054
- 055
- 056
- 057
- 058
- 059
- 060
- 061
- 062
- 063
- 064
- 065
- 066
- 067
- 068
- 069
- 070
- 071
- 072
- 073
- 074
- 075
- 076
- 077
- 078
- 079
- 080
- 081
- 082
- 083
- 084
- 085
- 086
- 087
- 088
- 089
- 090
- 091
- 092
- 093
- 094
- 095
- 096
- 097
- 098
- 099
- 100
#include "stdafx.h"
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <Windows.h>
#include <string.h>
#include <locale.h>
#include <time.h>
#define GetTime GetLocalTime
SYSTEMTIME systemtime;
int i;
int Hours;
char rus[4] = { 'r', 'u', 's' };
char color[9] = { 'c', 'o', 'l', 'o', 'r', ' ', '0', 'A' };
char cls[4] = { 'c', 'l', 's' };
char pause[6] = { 'p', 'a', 'u', 's', 'e' };
int main()
{
setlocale(0, rus);
system(color);
lab0:
while (true)
{
GetTime(&systemtime);
i = 1;
lab1:
if (i < 23 + 1)
{
if (i)
{
bool b = false;
if (systemtime.wMinute == 0)
{
b = true;
systemtime.wMinute = 1;
}
Hours = systemtime.wHour + (systemtime.wMinute / systemtime.wMinute);
if (Hours = systemtime.wHour + (systemtime.wMinute / systemtime.wMinute))
{
if (b == true)
{ systemtime.wMinute = 0; }
systemtime.wHour = Hours;
if (systemtime.wHour == (12 * 2) && !(systemtime.wHour < (12 * 2)) || systemtime.wHour >(12 * 2))
{
if (systemtime.wHour == (12 * 2))
{
if (!(systemtime.wHour < (12 * 2)) && !(systemtime.wHour >(12 * 2)))
{ systemtime.wHour = (systemtime.wHour - (12 * 2)); }
else
{ goto lab5; }
}
else
{
lab5:
break;
}
}
}
i = i + (i / i);
}
if (!i)
{ lab4: goto lab1; }
else
{ goto lab4; }
}
else if (i > 23 + 1)
{ goto lab6; }
else if(i == 23 + 1)
{ goto lab6; }
else
{ lab6: goto lab2; }
goto lab1;
lab2:
printf("Время: ");
if (systemtime.wHour < 10)
{
printf("%d", 0x0000);
}
printf("%d", systemtime.wHour);
printf(":");
if (systemtime.wMinute < 10)
{
printf("%d", 0x0000);
}
printf("%d", systemtime.wMinute);
i = 1;
lab3:
Sleep(1);
if (i <= 1000)
{
i = i + 1;
goto lab3;
}
system(cls);
return main();
goto lab0;
}
system(pause);
return 0;
}