-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
74 lines (63 loc) · 1.46 KB
/
main.cpp
File metadata and controls
74 lines (63 loc) · 1.46 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//START
#include<iostream> //input/output objects c++
#include<windows.h> //Sleep,gotoxy coordinate functions
#include"MMSystem.h" //plays audio track
#pragma comment(lib, "winmm.lib")
using namespace std;
COORD coord = {0, 0};
void gotoxy (int x, int y) //defining/initializing to predefined objects
{
coord.X = x;
coord.Y = y; // X and Y coordinates
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
//plays audio
void play(int a)
{
if(a==1)
PlaySound(TEXT("welcome.wav"), NULL, SND_SYNC);
if(a==2)
PlaySound(TEXT("collect.wav"), NULL, SND_SYNC);
if(a==3)
PlaySound(TEXT("mix.wav"), NULL, SND_SYNC);
if(a==4)
PlaySound(TEXT("thank_you.wav"), NULL, SND_SYNC);
}
void scroll_note() //welcome note
{
system("color CF");
int j,i,x,y;
for(i=0;i<27;i++)
{
gotoxy(i,12);cout<<" ";
cout<<"PAYME FAST ATM SERVICES";
Sleep(40);
}
for(j=67;j>30;j--)
{
gotoxy(j,15);
cout<<"WELCOMES YOU";cout<<" ";
Sleep(40);
}
play(1);
for (int c = 1; c <= 20; c++) //randomly printing "$"
{
x = rand() % 70 + 1; y = rand() % 20 + 1;
gotoxy(x,y);cout<<"$";
Sleep(180);gotoxy(x,y);cout<<" ";
}
gotoxy(27,12);cout<<"PAYME FAST ATM SERVICES";
gotoxy(31,15);cout<<"WELCOMES YOU";
for(int j=78;j>=0;j--)
{
gotoxy(j,20);cout<<"|";
gotoxy(j,4);cout<<"|";
Sleep(30);
}
gotoxy(56,23);cout<<"James 160114737050";
gotoxy(56,24);cout<<"Patrick 160114737051";
Sleep(2000);
}
int main() {
scroll_note(); //welcome note
}