-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimer.cpp
More file actions
56 lines (50 loc) · 1.75 KB
/
Copy pathtimer.cpp
File metadata and controls
56 lines (50 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// STOPWATCH USING C++:
#include <iostream>
#include <math.h>
#include <bits/stdc++.h>
#include <windows.h>
using namespace std;
int main()
{
system("color f2"); // for background color of screen
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE); // for the text color
char a, b;
SetConsoleTextAttribute(h, 14);
cout << "\n\n\t\t press 'S' then enter, to start";
cin >> a;
if (a == 's' || 'S')
{
for (int i = 0; i < 100; i++)
{
for (int j = 0; j < 60; j++)
{
for (int k = 0; k < 60; k++)
{
system("CLS");
SetConsoleTextAttribute(h, 13);
cout << "\n\n\t\t******************************";
SetConsoleTextAttribute(h, 12);
cout << "\n\t\t\t** STOPWATCH **";
SetConsoleTextAttribute(h, 13);
cout << "\n\t\t******************************";
SetConsoleTextAttribute(h, 14);
cout<<"\n \n \t \t \t";
cout << i << " : " << j << " : " << k;
SetConsoleTextAttribute(h, 13);
cout<<"\n\n\t\t******************************";
SetConsoleTextAttribute(h, 12);
cout<<"\n\n\t\tpress 'ctr + c' to stop";
for (int l = 1; l < 22999; l++)
{
for (int p = 1; p < 49990; p++)
{
p = p + 1;
}
l = l + 1;
}
}
}
}
}
return 0;
}