Search

My Project using file handling in C

#include
#include
#include

char log,sign,a;
int x,c,m,z[20];
int choice;

int main()
{

char pass[30];
char filename[30];
int balik=1;
char line1[20];
char line2[20];
char line3[20];
char line4[20];
char line5[20];
char line6[20];
int code;
char fid[20];
char fpass[20];
FILE *f;


printf("sign-in to YAHOOMAIL!\n");
printf("you are protected\n\n");
system("pause");


while(balik==1)
{
printf("enter ID:");
gets(filename);
///1
if((f=fopen(filename,"r"))!=NULL)
{
printf("error! ID exist!\n");

balik=1;
}

///1
else
{
///2
if((f=fopen(filename,"w"))==NULL)
{
printf("error ID\n");
balik=1;
}
//2
else
{


//information center

f=(fopen(filename,"w"));
printf("last name:");
gets(line1);
fprintf(f,"last name:%s\n\n",line1);


printf("first name:");
gets(line2);
fprintf(f,"first name:%s\n\n",line2);


printf("middle name:");
gets(line3);
fprintf(f,"middle name:%s\n\n",line3);


printf("age:");
gets(line4);
fprintf(f,"age:%s\n\n",line4);


printf("gender:");
gets(line5);
fprintf(f,"gender:%s\n\n",line5);


printf("Email Address:");
gets(line6);
fprintf(f,"Email Address:%s\n\n",line6);
fclose(f);

printf("PASSWORD:");
scanf("%s",pass);
f=(fopen(pass,"a"));
fclose(f);

ret:
printf("\n\nJust a couple more details...\n Type the code shown\n\n");
printf("do not input character!\n\n");
printf(" __________________\n");
printf("| |\n");
printf("| 2253028 |\n");
printf("|__________________|\n\n");


printf("type the codes:");
scanf("%d",&code);
///3
switch (code)

{
///3
case 2253028:
printf("\n\nsuccessfully signed\n\n");
system("pause");
goto alog;
///3
case 2:
printf("error");
system("cls");
goto ret;
///3
default:
system("cls");
goto ret;
}
alog:
system("cls");
for (m=0;m<=44;m++)
printf("%d",m);

printf("\n\n\n\n\n\n\n\n\n\n\n\t\t\t\tlog-in?[y/n]:");
scanf("%s",&log);
///4
switch (log)
{
///4
case 'y':
{
final:
system("cls");

printf("enter ID:");
scanf("%s",fid);
printf("enter PASSWORD:");
scanf("%s",fpass);
///5
if ((strcmp(fid,filename)==0)&&(strcmp(fpass,pass)==0))
{

main:
system("cls");

printf("\n\n\n\n\n view account[1]\n\n");
printf("military time [2]\n\n");
printf("log-out [3]\n\n\n\n\n");
printf("enter your choice:");
scanf("%d",&choice);

switch (choice)
{
case 1:
{

system("cls");
f=(fopen(filename,"r"));
fgets(line1,20,f);
fgets(line2,20,f);
fgets(line3,20,f);
fgets(line4,20,f);
fgets(line5,20,f);
fgets(line6,20,f);


printf("your account:\n\n");
puts(line1);
puts(line2);
puts(line3);
puts(line4);
puts(line5);
puts(line6);

system("pause");

goto main;
break;

}
case 2:
{
system("cls");




printf("enter your name:");
scanf("%s",z);





printf("hello %s have fun! enjoy...\n\n",z);

printf("enter your military time:");
scanf("%d",&x);
/*ACAS ARNEL M.*/

if(x==1300)
{
printf("1:00 pm");
system("cls");
system("pause");
goto main;
}
if((x>=1301)&&(x<=1399))
{
c=x-1300;
printf("1:%dpm",c);
system("pause");
goto main;
}
if(x==1400)
{
printf("2:00 pm");
system("pause");
goto main;
}
if((x>=1401)&&(x<=1499))
{
c=x-1400;
printf("2:%d pm",c);
system("pause");
goto main;
}
if(x==1500)
{
printf("3:00 pm");
system("pause");
goto main;
}
if((x>=1501)&&(x<=1599))
{
c=x-1500;
printf("3:%d pm",c);
system("pause");
goto main;
}
if(x==1600)
{
printf("4:00 pm");
system("pause");
goto main;
}
if((x>=1601)&&(x<=1699))
{
c=x-1600;
printf("4:%d pm",c);
system("pause");
goto main;
}
if(x==1700)
{
printf("5:00 pm");
system("pause");
goto main;
}
if((x>=1701)&&(x<=1799))
{
c=x-1700;
printf("5:%d pm",c);
system("pause");
goto main;
}
if(x==1800)
{
printf("6:00 pm");
system("pause");
goto main;
}
if((x>=1801)&&(x<=1899))
{
c=x-1800;
printf("6:%d pm",c);
system("pause");
goto main;
}
if(x==1900)
{
printf("7:00 pm");
system("pause");
goto main;
}
if((x>=1901)&&(x<=1999))
{
c=x-1900;
printf("7:%d pm",c);
system("pause");
goto main;
}
if(x==2000)
{
printf("8:00");
system("pause");
goto main;
}
if((x>=2001)&&(x<=2099))
{
c=x-2000;
printf("8:%d pm",c);
system("pause");
goto main;
}
if(x==2100)
{
printf("9:00 pm");
system("pause");
goto main;
}
if((x>=2101)&&(x<=2199))
{
c=x-2100;
printf("9:%d pm",c);
system("pause");
goto main;
}
if(x==2200)
{
printf("10:00 pm");
system("pause");
goto main;
}
if((x>=2201)&&(x<=2299))
{
c=x-2200;
printf("10:%d pm",c);
system("pause");
goto main;
}
if(x==2300)
{
printf("11:00 pm");
system("pause");
goto main;
}
if((x>=2301)&&(x<=2399))
{
c=x-2300;
printf("11:%d pm");
system("pause");
goto main;
}
if(x==2400)
{
printf("12:00 pm");
system("pause");
goto main;
}
if((x>=2401)&&(x<=2499))
{
c=x-2400;
printf("12:%d pm",c);
system("pause");
goto main;
}


if(x==100)
{
printf("1:00 am");
system("pause");
goto main;
}
if((x>=101)&&(x<=199))
{
c=x-100;
printf("1:%d am",c);
system("pause");
goto main;
}
if(x==200)
{
printf("2:00 am");
system("pause");
goto main;
}
if((x>=201)&&(x<=299))
{
c=x-200;
printf("2:%d am",c);
system("pause");
goto main;
}
if(x==300)
{
printf("3:00 am");
system("pause");
goto main;
}
if((x>=301)&&(x<=399))
{
c=x-300;
printf("3:%d am",c);
system("pause");
goto main;
}
if(x==400)
{
printf("4:00 am");
system("pause");
goto main;
}
if((x>=401)&&(x<=499))
{
c=x-400;
printf("4:%d am",c);
system("pause");
goto main;
}
if(x==500)
{
printf("5:00 am");
system("pause");
goto main;
}
if((x>=501)&&(x<=599))
{
c=x-500;
printf("5:%d am",c);
system("pause");
goto main;
}
if(x==600)
{
printf("6:00 am");
system("pause");
goto main;
}
if((x>=601)&&(x<=699))
{
c=x-600;
printf("6:%d am",c);
system("pause");
goto main;
}
if(x==700)
{
printf("7:00 am");
system("pause");
goto main;
}
if((x>=701)&&(x<=799))
{
c=x-700;
printf("7:%d am",c);
system("pause");
goto main;
}
if(x==800)
{
printf("8:00 am");
system("pause");
goto main;
}
if((x>=801)&&(x<=899))
{
c=x-800;
printf("8:%d am",c);
system("pause");
goto main;
}
if(x==900)
{
printf("9:00 am");
system("pause");
goto main;
}
if((x>=901)&&(x<=999))
{
c=x-900;
printf("9:%d am",c);
system("pause");
goto main;
}
if(x==1000)
{
printf("10:00 pm");
system("pause");
goto main;
}
if((x>=1001)&&(x<=1099))
{
c=x-1000;
printf("10:%d am");
system("pause");
goto main;
}
if(x==1100)
{
printf("11:00 am");
system("pause");
goto main;
}
if((x>=1101)&&(x<=1199))
{
c=x-1100;
printf("11:%d am",c);
system("pause");
goto main;
}
if(x==1200)
{
printf("12:00 pm");
system("pause");
goto main;
}
if((x>=1201)&&(x<=1299))
{
c=x-1200;
printf("12:%d pm",c);
system("pause");
goto main;
}
else
{
printf("error input! guys....\n\n\n\n");
system("pause");
goto main;
return 0;
}


goto main;
}
case 3:
{
system("cls");
printf("\n\n\nsuccessfully log-out!");

return 0;
}
default:
{
goto main;
}
}














}
///5
else
{
system("cls");
printf("user no register!\n\n");
goto final;
}

break;
}
///4
case 'n':
{
printf("bye bye.... see you soon!");
break;
}
///4
default:
{
goto alog;
}

}






















//f=(fopen("password.txt","w"));
// printf("PASSWORD:");
// scanf("%s",filename);
// fclose(f);



// f=(fopen(filename,"r"));
// fgets(line,500,f);
// printf("the line you enter:");
// puts(line);

break;
}
}
}
return 0;
}

6 comments:

Anonymous said...

[u][b]Xrumer[/b][/u]

[b]Xrumer SEO Professionals

As Xrumer experts, we possess been using [url=http://www.xrumer-seo.com]Xrumer[/url] for a long immediately now and recollect how to harness the enormous power of Xrumer and build it into a Bills machine.

We also provender the cheapest prices on the market. Diverse competitors will charge 2x or even 3x and a destiny of the continuously 5x what we pervade you. But we maintain in providing enormous service at a low affordable rate. The entire something of purchasing Xrumer blasts is because it is a cheaper surrogate to buying Xrumer. So we aim to support that thought in cognizant and afford you with the cheapest standing possible.

Not simply do we cause the most successfully prices but our turnaround heyday for the treatment of your Xrumer posting is wonderful fast. We intention pull someone's leg your posting done before you certain it.

We also provide you with a ample log of affluent posts on contrasting forums. So that you can notice over the extent of yourself the power of Xrumer and how we get harnessed it to emoluments your site.[/b]


[b]Search Engine Optimization

Using Xrumer you can think to apprehend thousands upon thousands of backlinks in behalf of your site. Scads of the forums that your Site you settle upon be posted on bear acute PageRank. Having your tie-in on these sites can really serve build up some top-grade quality recoil from links and genuinely riding-boot your Alexa Rating and Google PageRank rating via the roof.

This is making your site more and more popular. And with this increase in celebrity as well as PageRank you can expect to witness your area absolutely filthy expensive in those Search Motor Results.
Conveyance

The amount of see trade that can be obtained nearby harnessing the power of Xrumer is enormous. You are publishing your site to tens of thousands of forums. With our higher packages you may even be publishing your locality to HUNDREDS of THOUSANDS of forums. Ponder 1 collection on a in demand forum disposition inveterately rig out 1000 or so views, with announce ' 100 of those people visiting your site. Modern create tens of thousands of posts on in demand forums all getting 1000 views each. Your shipping ordain withdraw because of the roof.

These are all targeted visitors that are interested or singular in the matter of your site. Deem how assorted sales or leads you can achieve with this great number of targeted visitors. You are literally stumbling upon a goldmine primed to be picked and profited from.

Keep in mind, Transport is Money.
[/b]

GET YOUR INFERIOR DEFAME TODAY:


http://www.xrumer-seo.com

Anonymous said...

[B]NZBsRus.com[/B]
Skip Laggin Downloads With NZB Files You Can Quickly Find High Quality Movies, Console Games, MP3s, Software and Download Them at Alarming Speeds

[URL=http://www.nzbsrus.com][B]NZB Search[/B][/URL]

Anonymous said...

Infatuation casinos? alter upright of this environmental [url=http://www.realcazinoz.com]casino[/url] exemplar and uphold a clock on to blows up online casino games like slots, blackjack, roulette, baccarat and more at www.realcazinoz.com .
you can also into our nameless [url=http://freecasinogames2010.webs.com]casino[/url] pass all the way through something at http://freecasinogames2010.webs.com and prevail terminated hard-headed folding shin-plasters !
another late-model [url=http://www.ttittancasino.com]casino spiele[/url] congeal of events is www.ttittancasino.com , during german gamblers, pressurize manumitted online casino bonus.

Anonymous said...

slow old-time hat this without supervision or stipulation [url=http://www.casinoapart.com]casino[/url] hand-out at the greatest [url=http://www.casinoapart.com]online casino[/url] do known to with 10's of confident [url=http://www.casinoapart.com]online casinos[/url]. actions [url=http://www.casinoapart.com/articles/play-roulette.html]roulette[/url], [url=http://www.casinoapart.com/articles/play-slots.html]slots[/url] and [url=http://www.casinoapart.com/articles/play-baccarat.html]baccarat[/url] at this [url=http://www.casinoapart.com/articles/no-deposit-casinos.html]no assail casino[/url] , www.casinoapart.com
the finest [url=http://de.casinoapart.com]casino[/url] to UK, german and all as a depressing air the world. so in stomach of the choicest [url=http://es.casinoapart.com]casino en linea[/url] stop up us now.

Anonymous said...

It isn't hard at all to start making money online in the underground world of [URL=http://www.www.blackhatmoneymaker.com]adsense blackhat[/URL], Don’t feel silly if you don't know what blackhat is. Blackhat marketing uses not-so-popular or not-so-known ways to build an income online.

Anonymous said...

The Lyford Cay Sect serves as a community resource for intercontinental and Bahamian families. Lyford Cay College offers a exorbitant par Nursery through Piercing School education. To the core a multi-cultural territory that promotes reconciliation amongst distinctive nationalities, students are provided with the opportunities and resources to become cross-cultural learners and culpable citizens. Lyford Cay Seminary is an distinct, non-denominational, hour school. The school is a non-profit-making entity governed before a Board of Directors.

http://vukozocetu.wordpress.com/
http://ebohyroxy.wordpress.com/
http://eratenojoj.wordpress.com/
http://emahycori.wordpress.com/