You are on page 1of 6

#include<stdio.h> #include<string.h> #include<conio.

h> main() { int sign_up,up,in,sign, name, gender, add, word, y; int letter, a,b, c, d, e, dog,cousin, author, summer; int book, nMonth, nDay, nYear, account;

clrscr(); printf("Welcome to Yourworld!\n\n"); printf("New to Yourworld?\n"); printf("Sign up Enter[up] \nSign in Enter[in]:"); scanf("%s",&sign);

if (sign==sign_up) {

printf("sign up"); printf("\nFirst Name;"); scanf("%s",&name); printf("\nMiddle Name:"); scanf("%s",&name); printf("\nSurname:"); scanf("%s",&name); printf("\nGender:"); scanf("%s",&gender); printf("\nB-day:[mm,dd,yyyy]"); scanf("%d,%d,%d",&nMonth,nDay,nYear); printf("\nEmail:"); scanf("%s",&add); printf("\nPassword:"); scanf("%s",&word); printf("\nRetype Password:");

scanf("%s",&word); printf("\nSign up?"); scanf("%s",&y); }

if (y==y){ printf("Select letter to the question you want to answer.\n\n"); printf("a.What is the name of yor favorite Dog?\n"); printf("b.Who is your favorite cousin?\n"); printf("c.Who is your favorite author?\n"); printf("d.Where do you spend your summer?\n"); printf("e.What is your favorite book?\n"); printf("Enter letter:"); scanf("%s",& letter);

switch (letter){

case 'a':

printf("What is the name of your fav.Dog?:"); scanf("%s",&dog); break; case 'b': printf("Who is your fav.cousin?:"); scanf("%s",&cousin); break; case 'c': printf("Who is your fav.author?:"); scanf("%s",&author); break; case'd': printf("where do you spend your summer?:");

scanf("%s",&summer); break; case'e': printf("what is your fav.book?:"); scanf("%s",&book); break; default: printf("warning!wrong choice."); scanf("%s"); } } else { printf("do you have an account already?\n\n"); printf("Sign in\n"); printf("\nEnter a valid Yourworld account:\n"); scanf("%s",&account); printf("Enter Password:");

scanf("%s",&word); } if(account/word==account/word){ printf("Welcome to yourworld!\n"); printf("Create your own world here!\n"); printf("Goodluck & Enjoy!"); scanf("%s");

} if(sign!=up/in){ printf("Error Occur!Kindly check if your email/password is correct\n"); printf("No email at all?\n"); printf("Kindly sign up!\n Try again"); scanf("%s"); } return sign; }

You might also like