-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtime.h
47 lines (41 loc) · 1.32 KB
/
time.h
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
#include <iostream>
#include <ctime>
#include<stdlib.h>
#include <dos.h>
using namespace std;
void time(){
// current date/time based on current system
time_t now = time(0);
tm *ltm = localtime(&now);
cout<<"****\tTime:"<<ltm->tm_hour<<":"<<ltm->tm_min<<":"<<ltm->tm_sec<<"\t\t\t\t\t\tDate: "<<ltm->tm_mday<<"/"<<1+ltm->tm_mon<<"/"<<1900+ltm->tm_year<< "\t ****\n";
}
void interface(){
for(int i=0;i<3;i++)
cout<<"*************************************************************************************"<< endl;
for (int i = 0; i<20; i++){
if (i == 2){
time();
}
if (i == 6)
cout<<"****\t\t\t WELCOME TO FIA SUPERMARKET\t\t\t\t ****\n";
else if(i == 8){
cout<<"****\t\t\t Press any key to continue!\t\t\t\t ****\n";
}
else if(i == 15){
cout<<"**** By:\t\t\t\t\t\t\t\t\t ****\n";
}
else if(i == 16){
cout<<"**** 1)Muhammad Ibad Saleem (19K-0220)\t\t\t\t\t\t ****\n";
}
else if(i == 17){
cout<<"**** 2)Ali Muhammad (19K-0324)\t\t\t\t\t\t\t ****\n";
}
else if(i == 18){
cout<<"**** 3)Faisal Malik (19K-0144)\t\t\t\t\t\t\t ****\n";
}
else
cout<<"****\t\t\t\t\t\t\t\t\t\t ****\n";
}
for(int i=0; i<3; i++)
cout<<"*************************************************************************************"<< endl;
}