project - unione
TRANSCRIPT
-
8/18/2019 Project - Unione
1/42
COMPUTER SCIENCE
PROJECT
UNIONE
niting Everyone
ANMOL GARG
Roll no. = 8
XI Sci A
#include
#include
1
-
8/18/2019 Project - Unione
2/42
#include
#include
#include
#include#include
#include
#include
#include
#include
void loadbar(int a, int b);
void welscr(int , int y);
void disclaimer(int , int y);
void start(int , int y);
void login(int , int y);
void wronglogin(int , int y);
void loggingin(int , int y, int n);
void signup(int , int y);
void userid(int n);
void passchec!(char str");
void passmatch(char ", char c");
void creating(int , int y);
void con$rmacc(int , int y, int n);
void accno(int n);
void securitychec!();
void signingup(int , int y, int n);
void mon(int n);
void homep(int , int y, int n);
void loggingout(int , int y);
void pro$le(int , int y, int n);
void updateprof(int , int y, int n);
void passchange(int n, int , int %, char cy");
&
-
8/18/2019 Project - Unione
3/42
void passmatch1(char ", char c");
void passchec!1(char str");
void passmatch&(int n, char ", char c", int %, int y);
struct '*+-
char fname"&/, tfname"&/, lname"&/, tlname"&/, userid"0/;
char password"0/, cpassword"0/, logpass"1, loguserid"2/;
char dob"1/, tdob"1/, mobno"1/, accno"&/, monthname"1;
char city"&/, state"&/, hometown"&/, country"&/;
char month"&, su3"&, desp"/ ;
char favsong"1/, favsport"&/, favhobby"0/, favmovie"1/;
4stud"2;
void main()
clrscr();
int gdriver 5 '6, gmode;
initgraph(7gdriver, 7gmode, 869::6::+8);
int mid5getma()=&, midy5getmay()=&;
loadbar(mid,midy);
closegraph();
4
void loadbar(int a, int b)
int 51/, ch5/;
0
-
8/18/2019 Project - Unione
4/42
setcolor(?);
settetstyle(/,@AB+CD'+B,&);
outtety(1E,1F/,8A*'+G, H*- I*+8);settetstyle(/,@AB+CD'+B,&);
for(int i5/; i
-
8/18/2019 Project - Unione
5/42
outtety(M1E,yM1/,8AIG -A6+* GIABQ8);
setcolor(K);
settetstyle(/,@AB+CD'+B,1/);outtety(F,1,8?G+AG8);
settetstyle(1,@AB+CD'+B,);
outtety(1&,&,8?G++G RBSAG8);
setcolor(2);
settetstyle(0,@AB+CD'+B,);
delay(0//);
outtety(M&2,yJ1&/,8Nade by *GNA T -@AG+8);
settetstyle(&,@AB+CD'+B,E);
delay(0//);
outtety(J/,yJ&1/,8Hress any !ey to continue8);
getch();
disclaimer(,y);
4
void disclaimer(int , int y)
clrscr();
cleardevice();
cout
-
8/18/2019 Project - Unione
6/42
outtety(&&,&, 8'+-6*+NB8);
settetstyle(E,@AB+CD'+B,0);
outtety(1,F, 8 ?G+AG is a service that oUers free networ!ing for allthe8);
outtety(1,1/,8students of O+ *. ?G+AG reserves the right to
terminate8);
outtety(1,1&,8accounts for any !ind of intolerable,oUensive 7 abusive
posts 8);
outtety(1,12,8or comments reported 7 also in case of unveri$ed 7
false8);
outtety(1,1E,8information provided during sign up process. *lso the
members8);
outtety(1,1F,8are reVuired to pass the given criteria to ma!e theirpro$les.8);
outtety(1,&1,8 :a Sou must be at least 1 years old.8);
outtety(1,&2,8 :a Sou must be studying in O+ *.8);
outtety(1,&,8 :a Sou must have a basic !nowlegde of 6JJ.8);
outtety(1,0/,8Nembers should use this platform as means of
communication8);
outtety(1,0&,8 7 networ!ing only 7 not for their commercial gainsW8);
outtety(1,02,8 Sou may proceed with the ogin=-ign ?p
process...8);
settetstyle(/,@AB+CD'+B,&);
outtety(&&,2//, 8:2@*GQ SA?W:28);
getch();
start(,y);
4
void start(int , int y)
char ch;
clrscr();
E
-
8/18/2019 Project - Unione
7/42
cleardevice();
setb!color(11);
setcolor(2);
settetstyle(&,@AB+CD'+B,E);
outtety(1,1,8https9==www.unione.com=start8);
settetstyle(/,@AB+CD'+B,&);
outtety(M0//, yMF1,8 *B*'S * T GI 8);
outtety(M0//, yME,8 NNBX T @BX 8);
setcolor(E);
outtety(M0//, yM01,8 A+G T -+G ?H ( T -)9 8);
settetstyle(,@AB+CD'+B,2);
gotoy(/,12);
cin>>ch;
if(ch55PlPTTch55PP)
login(,y);
else if(ch55PsPTTch55P-P)
signup(,y);
4
void login(int , int y)
clrscr();
cleardevice();
int n;
-
8/18/2019 Project - Unione
8/42
cout
-
8/18/2019 Project - Unione
9/42
void wronglogin(int , int y)
clrscr();cleardevice();
int n;
settetstyle(1,@AB+CD'+B,0);
setcolor(2);
outtety(1&,0&,8Irong ?ser +'=Hassword nteredWWW8);
cout
-
8/18/2019 Project - Unione
10/42
cin>>stud"nM1.logpass;
int a5strcmp(stud"nM1.userid,stud"nM1.loguserid);
int b5strcmp(stud"nM1.password,stud"nM1.logpass);
if(a55/77b55/)
loggingin(,y,n);
else
wronglogin(,y);
4
void loggingin(int , int y, int n)
clrscr();
int b5K, t51;
for(int Y5/; Y
-
8/18/2019 Project - Unione
11/42
4
homep(,y,n);
4
void signup(int , int y)
clrscr();
cleardevice();
int n;
cout
-
8/18/2019 Project - Unione
12/42
gotoy(,1);
cout
-
8/18/2019 Project - Unione
13/42
outtety(1,K/,8GB SA?B '*+- AI98);
gotoy(,K);
cout
-
8/18/2019 Project - Unione
14/42
gotoy(,&&);
cout
-
8/18/2019 Project - Unione
15/42
cout
-
8/18/2019 Project - Unione
16/42
-
8/18/2019 Project - Unione
17/42
4
void passchec!(char str")
start9
int count5/;
int upp5/,low5/,num5/;
for(int i5/; str"iW5G?; iJJ)
if(isupper(str"i))
uppJJ;
else if(islower(str"i))
lowJJ;
else if(isdigit(str"i))
numJJ;
4
settetstyle(2,@AB+CD'+B,0);
if(i
-
8/18/2019 Project - Unione
18/42
gotoy(&2,1K);
cout
-
8/18/2019 Project - Unione
19/42
gotoy(0,&1);
cout
-
8/18/2019 Project - Unione
20/42
setcolor(1/);
settetstyle(0,@AB+CD'+B,&);
outtety(/,0,8H*--IAB'- N*6@WW8);
4
else
gotoy(&2,&&);
cout
-
8/18/2019 Project - Unione
21/42
cleardevice();
setb!color(bJJ);
setcolor(tJJ);settetstyle(0,@AB+CD'+B,2);
outtety(M&&,yM1//,86B*+G SA?B *66A?G8);
outtety(M&&,yME/,8his will ta!e a momentW8);
for(int i5; i
-
8/18/2019 Project - Unione
22/42
cout>ch;
if(ch55PyPTTch55PSP)
delay(1//);
signingup(,y,n);
4
else if(ch55PnPTTch55PGP)
&&
-
8/18/2019 Project - Unione
23/42
delay(1//);
eit(/);
4
else if(ch55PcPTTch55P6P)
delay(1//);
signup(,y);
4
4
void accno(int n)
settetstyle(0,@AB+CD'+B,0);
outtety(0/,0/,8SA?B ?G+\? *66A?G GA. +- 9 8);
stud"nM1.accno"25PMP;
stud"nM1.accno"K5PMP;
stud"nM1.accno"125G?;
randomi%e();
for(int i5/; i
-
8/18/2019 Project - Unione
24/42
void securitychec!()
start9char "K,code"K,code&"K;
for(int i5/;i
-
8/18/2019 Project - Unione
25/42
gotoy(/,12);
cin>>code;
if(code"/55PtPTTcode"/55PP 77 code"155P:/P)
gotoy(1,1F);
cout
-
8/18/2019 Project - Unione
26/42
4
else
setcolor(2);
gotoy(1,11);
cout
-
8/18/2019 Project - Unione
27/42
for(int i5; i
-
8/18/2019 Project - Unione
28/42
brea!;
case P2P9 strcpy(stud"nM1.monthname,8*HB+8);
stud"nM1.monthname"5G?; brea!;
case PP9 strcpy(stud"nM1.monthname,8N*S8);
stud"nM1.monthname"05G?;
brea!;
case PEP9 strcpy(stud"nM1.monthname,8]?G8);
stud"nM1.monthname"25G?;
brea!;
case PP9 strcpy(stud"nM1.monthname,8]?S8);
stud"nM1.monthname"25G?;
brea!;
case PFP9 strcpy(stud"nM1.monthname,8*??-8);
stud"nM1.monthname"5G?;
brea!;
case PKP9 strcpy(stud"nM1.monthname,8-HNB8);
stud"nM1.monthname"K5G?;
brea!;
4
4
else
switch(stud"nM1.month"1)
&F
-
8/18/2019 Project - Unione
29/42
case P/P 9 strcpy(stud"nM1.monthname,8A6AB8);
stud"nM1.monthname"5G?;
brea!;
case P1P 9 strcpy(stud"nM1.monthname,8GARNB8);
stud"nM1.monthname"F5G?;
brea!;
case P&P 9 strcpy(stud"nM1.monthname,8'6NB8);
stud"nM1.monthname"F5G?;
brea!;
4
4
if(stud"nM1.dob"/55P1P)
strcpy(stud"nM1.su3,8th8);
else if(stud"nM1.dob"/W5P1P)
if(stud"nM1.dob"155P1P)
strcpy(stud"nM1.su3,8st8);
else if(stud"nM1.dob"155P&P)
strcpy(stud"nM1.su3,8nd8);
else if(stud"nM1.dob"155P0P)
strcpy(stud"nM1.su3,8rd8);
else
strcpy(stud"nM1.su3,8th8);
4
4
&K
-
8/18/2019 Project - Unione
30/42
void homep(int , int y, int n)
clrscr();cleardevice();
int choice;
cout
-
8/18/2019 Project - Unione
31/42
cout
-
8/18/2019 Project - Unione
32/42
default9 eit(/);
4
4
void loggingout(int , int y)
clrscr();
int b5K, t51;
for(int Y5/; Y
-
8/18/2019 Project - Unione
33/42
clrscr();
cleardevice();
int num;
cout
-
8/18/2019 Project - Unione
34/42
gotoy(1/,);
cout
-
8/18/2019 Project - Unione
35/42
gotoy(12,02);
cin>>stud"nM1.favsport;
gotoy(1,1);coutstud"nM1.favmovie;
gotoy(1,1E);
coutstud"nM1.favsong;
gotoy(1/,1F);
coutstud"nM1.desp;
homep(,y,n);
4
void passchange(int , int %, int n, char cy")
clrscr();
cleardevice();
cout
-
8/18/2019 Project - Unione
36/42
passmatch1(stud"nM1.password,y);
gotoy(2,);cout>newp;
passchec!1(newp);
gotoy(2,11);
cout
-
8/18/2019 Project - Unione
37/42
if(w55/)
gotoy(0,E);
cout
-
8/18/2019 Project - Unione
38/42
4
4
void passchec!1(char str")
start9
int count5/;
int upp5/,low5/,num5/;
for(int i5/; str"iW5G?; iJJ)
if(isupper(str"i))
uppJJ;
else if(islower(str"i))
lowJJ;
else if(isdigit(str"i))
numJJ;
4
settetstyle(2,@AB+CD'+B,0);
if(i
-
8/18/2019 Project - Unione
39/42
settetstyle(0,@AB+CD'+B,&);
setcolor(2);
outtety(/,10/,8H*--IAB' AA -@ABWW (BBS)8);
gotoy(&K,F);
cout
-
8/18/2019 Project - Unione
40/42
if(numW5/ 77 uppW5/ 77 lowW5/)
gotoy(0,K);
cout
-
8/18/2019 Project - Unione
41/42
gotoy(&K,11);
for (int Y5/;Y
-
8/18/2019 Project - Unione
42/42
gotoy(&K,11);
gets(c);
goto start;
44