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
|
#include<iostream.h>
#include<conio.h>
#include<dos.h>
#include<stdio.h>
#define g gotoxy
main()
{
clrscr();
int w,x,y,z;
char un[50],pass[50],option,option2;
do
{
clrscr();
g(25,6); cout<<"Welcome to MATRIX WORLD!";
g(32,8); cout<<"Username:\n";
g(32,10); cout<<"Password:\n";
g(32,9); gets(un);
g(32,11); gets(pass);
if((un=="Mizore") && (pass=="R+V"))
do
{
clrscr();
g(30,6); cout<<"Choose transaction:";
g(27,8); cout<<"[1] - Ascending numbers";
g(34,9); cout<<"(using for loop)";
g(27,10); cout<<"[2] - Descending numbers";
g(34,11); cout<<"(using while loop)";
g(27,12); cout<<"[3] - Programmer's Profile";
g(36,7); cin>>x;
{
switch(x)
{
case 1:
clrscr();
cout<<"Enter a number: "; cin>>y;
cout<<"\nEnter ending number: "; cin>>z;
cout<<"\nAscending numbers are\n";
for(w=y; w<=z; w++)
{
cout<<w<<"\n";
delay(500);
}
break;
case 2:
clrscr();
cout<<"Enter a number: "; cin>>y;
cout<<"\nEnter ending number: "; cin>>z;
cout<<"\nDescending numbers are\n";
for(w=y; w>=z; w--)
{
cout<<w<<"\n";
delay(500);
}
break;
case 3:
clrscr();
g(30,5); cout<<"PROGRAMMER";
g(20,7); cout<<"LOLOLOLOLOLOLOL";
g(25,9); cout<<"COPYRIGHT MARCH 2013";
break;
default:
clrscr();
cout<<"Your input was invalid\n";
cout<<"Do you want to choose again?Y for yes\n";
cin>>option2;
break;
}
}
}
while(option2=='Y'||option2=='y');
else
{
clrscr();
g(28,8); cout<<"Sorry you have entered incorrect";
g(32,10); cout<<"Username and Password!";
g(23,12); cout<<"Press Y/y to go back to the log in screen";
g(35,14); cin>>option;
}
}
while(option=='Y'||option=='y');
clrscr();
g(28,10); cout<<"Thank you for using my program!";
getch();
return 0;
}
|