Mr_Ch3ck3r
Honorary Poster
- Joined
- Aug 31, 2017
- Posts
- 296
- Reaction
- 28
- Points
- 143
- Age
- 22
ang problem ko po is pano ako makapaglalagay ng home address ko (with numbers,symbols,letters) ng hindi nag sskip or end agad ung program.
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
system("color 02");
char menu, fname[10], lname[10], mname[10], gender, bday, sno, college, shs, jhs, fullname, mun, h_adress;
int an[13],age,batch;
printf("Welcome To OLFU Alumni Registration System!!");
printf("\n\nHello, would you like to: \n");
printf("\n ____________________");
printf("\n| Please Choose! |");
printf("\n|____________________|");
printf("\n| |");
printf("\n| A.NEW |");
printf("\n| B.OLD |");
printf("\n| C.EXIT |");
printf("\n| |");
printf("\n|____________________|");
printf("\nPLEASE TYPE: ");
scanf("%s",&menu);
switch (menu){
case 'A':
printf("Please Fill Up The Following");
printf("\nLast Name: ");
scanf(" %[^\n]s",lname);
printf("\nFirst Name: ");
scanf(" %[^\n]s",fname);
printf("\nMiddle Name: ");
scanf(" %[^\n]s",mname);
printf("\nAge: ");
scanf("%d",&age);
printf("\n ____________________");
printf("\n| Please Choose! |");
printf("\n|____________________|");
printf("\n| |");
printf("\n| F=FEMALE |");
printf("\n| M=MALE |");
printf("\n| |");
printf("\n| |");
printf("\n|____________________|");
printf("\nGender: ");
scanf("%s",&gender);
printf("Batch:");
scanf("%d",&batch);
printf("House Address: ");
scanf ("%d",&h_adress);
printf("Municipality: ");
scanf(" %[^\n]s",mun);
break;
case 'B':
printf("Please Type Your Alumni Id Number:");
scanf("%d",&an);
break;
case 'C':
printf("Thank You For Using The OLFU Alumni Registration System");
break;
}
}
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
system("color 02");
char menu, fname[10], lname[10], mname[10], gender, bday, sno, college, shs, jhs, fullname, mun, h_adress;
int an[13],age,batch;
printf("Welcome To OLFU Alumni Registration System!!");
printf("\n\nHello, would you like to: \n");
printf("\n ____________________");
printf("\n| Please Choose! |");
printf("\n|____________________|");
printf("\n| |");
printf("\n| A.NEW |");
printf("\n| B.OLD |");
printf("\n| C.EXIT |");
printf("\n| |");
printf("\n|____________________|");
printf("\nPLEASE TYPE: ");
scanf("%s",&menu);
switch (menu){
case 'A':
printf("Please Fill Up The Following");
printf("\nLast Name: ");
scanf(" %[^\n]s",lname);
printf("\nFirst Name: ");
scanf(" %[^\n]s",fname);
printf("\nMiddle Name: ");
scanf(" %[^\n]s",mname);
printf("\nAge: ");
scanf("%d",&age);
printf("\n ____________________");
printf("\n| Please Choose! |");
printf("\n|____________________|");
printf("\n| |");
printf("\n| F=FEMALE |");
printf("\n| M=MALE |");
printf("\n| |");
printf("\n| |");
printf("\n|____________________|");
printf("\nGender: ");
scanf("%s",&gender);
printf("Batch:");
scanf("%d",&batch);
printf("House Address: ");
scanf ("%d",&h_adress);
printf("Municipality: ");
scanf(" %[^\n]s",mun);
break;
case 'B':
printf("Please Type Your Alumni Id Number:");
scanf("%d",&an);
break;
case 'C':
printf("Thank You For Using The OLFU Alumni Registration System");
break;
}
}
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.