-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIPIANO.C
128 lines (123 loc) · 2.35 KB
/
IPIANO.C
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#include<stdio.h>
#include<dos.h>
#include<graphics.h>
#include<conio.h>
void main()
{
char a;
int gd=DETECT,gm,i,c=0;
initgraph(&gd,&gm,"");
settextstyle(4,0,5);
outtextxy(230,100,"PIANO");
settextstyle(1,0,1);
rectangle(100,200,504,300);
for(i=0;i<8;i++)
{
rectangle(102+c,202,152+c,298);
c+=50;
}
outtextxy(120,242,"SA");
outtextxy(120,262,"Q");
outtextxy(170,242,"RE");
outtextxy(170,262,"W");
outtextxy(220,242,"GA");
outtextxy(220,262,"E");
outtextxy(270,242,"MA");
outtextxy(270,262,"R");
outtextxy(320,242,"PA");
outtextxy(320,262,"T");
outtextxy(362,242,"DHA");
outtextxy(362,262,"Y");
outtextxy(420,242,"NI");
outtextxy(420,262,"U");
outtextxy(470,242,"SA");
outtextxy(470,262,"I");
setfillstyle(1,1);
while(1)
{
setfillstyle(1,1);
a=getch();
if(a!='x')
{
if(a=='q')//sa
{
floodfill(118,260,15);
sound(240);
delay(400);
nosound();
setfillstyle(1,0);
floodfill(123,255,15);
}
else if(a=='w')//re
{
floodfill(168,260,15);
sound(270);
delay(400);
nosound();
setfillstyle(1,0);
floodfill(168,260,15);
}
else if(a=='e')//ga
{
floodfill(218,260,15);
sound(300);
delay(400);
nosound();
setfillstyle(1,0);
floodfill(218,260,15);
}
else if(a=='r')//ma
{
floodfill(268,260,15);
sound(320);
delay(400);
nosound();
setfillstyle(1,0);
floodfill(268,260,15);
}
else if(a=='t')//pa
{
floodfill(318,260,15);
sound(360);
delay(400);
nosound();
setfillstyle(1,0);
floodfill(318,260,15);
}
else if(a=='y')//dha
{
floodfill(368,245,15);
sound(400);
delay(400);
nosound();
setfillstyle(1,0);
floodfill(368,245,15);
}
else if(a=='u')//ni
{
floodfill(418,260,15);
sound(450);
delay(400);
nosound();
setfillstyle(1,0);
floodfill(418,260,15);
}
else if(a=='i')//sa
{
floodfill(468,260,15);
sound(480);
delay(400);
nosound();
setfillstyle(0,1);
floodfill(468,260,15);
}
else
{
continue;
}
}
else
break;
}
getch();
}