-
November 16th, 2008, 05:33 AM
#16
Re: help me urgent
Originally Posted by dky
i hv see FAQS ald.so now can tech me how to check array?
help me help me!!
-
November 16th, 2008, 02:05 PM
#17
-
November 16th, 2008, 05:17 PM
#18
Re: help me urgent
Please, read the Announcement: Before you post.... carefully and try to follow this politics.
Victor Nijegorodov
-
November 16th, 2008, 06:36 PM
#19
Re: help me urgent
Originally Posted by VictorN
you mean ald hv someone post this question?
sorry i'm Junior Member and my english sos not well!
-
November 16th, 2008, 07:21 PM
#20
Re: help me urgent
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
November 17th, 2008, 03:32 AM
#21
Re: help me urgent
Originally Posted by dky
you mean ald hv someone post this question?
sorry i'm Junior Member and my english sos not well!
The problem is NOT your English but HOW you are using English in your posts...
Well, what I meant was (it is from "Announcements: Before you post.... "):
Your subject line will impact how well your question is answered. Your subject line should indicate the topic you are asking or commenting about. Here are some suggestions:
- Be concise.
- If you can do it in just a few words, ask a question or state the topic of your question.
- If you cannot state your question or comment in just a few words, then type the topic of your question or comment as the subject line
- Don't simply say "help". It is assumed that if you ask a question, you want help.
- If your subject line isn't concise or doesn't indicate a specific topic, many people will skip your posting.
Your Posting
Just as important to your subject line is the posting or question itself.
- Be concise, however...
- Make sure you ask a question if you want an answer.
- Make sure your provide enough details. For example, if you ask a database question, it might be necessary to include the database you are accessing.
- Make sure your question fits within the category you are posting. Posting a Visual Basic question in the Visual C++ forum will result in a lower chance for an answer.
- Use real grammer. If you use things like "u r gr8", you are going to be seen as unprofessional. Worse, many of the people who speak English as a second language may not understand what you are saying -- and thus won't be able to response.
- If you want to make a personal response back to someone, use private messages instead of responding in the public forum. Private Messages can be sent with the PM button.
Victor Nijegorodov
-
November 17th, 2008, 04:05 AM
#22
Re: help me urgent
ok i try now!!
question:
now is this part make me blur:what i need to write in <if>the code that can let me check still got how many empty place in my cust array??
Code:
for(row=0;row<sizeR;row++){
for(col=0;col<sizeC;col++){
if(0==ID[row][col]){
flag=1;
break;
}
else{
printf("Not enough seats available!The flight is fully booked!");
can?
-
November 17th, 2008, 04:38 AM
#23
Re: help me urgent
question:
now is this part make me blur:what i need to write in <if>the code that can let me check still got how many empty place in my cust array??
Code:
Code:
for(row=0;row<sizeR;row++){
for(col=0;col<sizeC;col++){
if(0==ID[row][col]){
for(j=0;j<i;j++){
printf("Enter your name");
scanf("%[\n]c",cust[sizeR][sizeC].name);
}
else{
printf("Not enough seats available!The flight is fully booked!");
how?
-
November 17th, 2008, 06:35 AM
#24
Re: help me urgent
Please, get back to the link "Announcements: Before you post.... " and read carefully about using code tags.
Victor Nijegorodov
-
November 17th, 2008, 10:03 AM
#25
Re: help me urgent
Originally Posted by dky
you mean ald hv someone post this question?
sorry i'm Junior Member and my english sos not well!
Wait...English is not your first language, yet you have no problem abbreviating the hell out of it???
-
November 17th, 2008, 12:37 PM
#26
Re: help me urgent
as CPUWizard ( and more people ) already said....
* Join the fight, refuse to respond to posts that contain code outside of tags.
that means.... put your code between [ code ] and [ / code ] tags.
-
November 17th, 2008, 02:56 PM
#27
Re: help me urgent
Originally Posted by fabman
as CPUWizard ( and more people ) already said....
* Join the fight, refuse to respond to posts that contain code outside of tags.
that means.... put your code between [ code ] and [ / code ] tags.
O oic
-
November 17th, 2008, 04:14 PM
#28
Re: help me urgent
void Booking(void)
{
strcpy(cust[sizeR][sizeC].flightNo,"AK65");
strcpy(cust[sizeR][sizeC].date,"25-12-2008");
strcpy(cust[sizeR][sizeC].time,"23:45");
strcpy(cust[sizeR][sizeC].gate,"G9");
int ID[4][5]={
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0}
};
int con;
int id;
int i;
int j;
int row;
int col;
int flag=0;
printf("How many seat are you required:\n");
scanf("%d",&i);
int available_seats = 0;
for(row=0; row<sizeR; row++){
for(col=0; col<sizeC; col++){
if(cust[sizeR][sizeC].id == 0){
available_seats++;
}
}
}
if(available_seats >= i){
for(j=0;j<i;j++){
printf("\t\t\t--- KL Airline Booking Ticket ---\n");
cust[sizeR][sizeC].id=id;
id++;
printf("\t\t\tBooking ID\t:%d",&cust[sizeR][sizeC].id);
printf("\t\t\tFlight No.:");
scanf("%s",cust[sizeR][sizeC].flightNo);
fflush(stdin);
printf("\t\t\tPassenger:");
scanf("%[\n]s",cust[sizeR][sizeC].name);
fflush(stdin);
printf("\t\t\tDate:");
scanf("%s",cust[sizeR][sizeC].date);
fflush(stdin);
printf("\t\t\tTime:");
scanf("%s",cust[sizeR][sizeC].time);
fflush(stdin);
printf("\t\t\tGate:");
scanf("%s",cust[sizeR][sizeC].gate);
fflush(stdin);
printf("\t\t\tSeat No:");
scanf("%c",&cust[sizeR][sizeC].seatNo);
fflush(stdin);
i++;
system("pause");
system("cls");
/* printf("Want Countinue? press 1");
scanf("%d",&con);
if(con==1)
{
system("cls");
Booking();
}
else
{
system("cls");
menu();
}*/
}
}
else{
printf("Not enough seats available!");
}
why it keep looping??
which line wrong???
-
November 17th, 2008, 04:32 PM
#29
Re: help me urgent
Which part of use code tags are you not understanding?
-
November 17th, 2008, 06:06 PM
#30
Re: help me urgent
Originally Posted by GCDEF
Which part of use code tags are you not understanding?
I have no idea... maybe [?
:-)
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|