![]() |
| ||
| Hospital Record.. double array.. help Hi everyone... again me... My new project is harder :) project wants to you how many records do you want to enter (easy part) surname name years doctor and illness. then asks to you 3 choices. 1- ascend surname 2- ascend doc 3- descend year ... and I guess I cant think wright way... anyway... my questions are..... *-I can find biggest year I can make it descending but how can I put it with other arrays together?? *- How can the project recognize which letter is first?? is it first a or b? how can I find it and again how can I write... (surname and doctors name..) *- is that way true or am I completly wrong way?????? please help....... #include<stdio.h> |
| ||
| Re: Hospital Record.. double array.. help input for example can be like that.... surname name year-of-birth doctor illness Can Murat 1976 Cerrarioğlu cancer Kaya Osman 1979 Altınel cancer Pelin Mine 1977 Peyter osteoporosis if we choose 3 outpu should be Kaya Osman 1979 Altınel cancer Pelin Mine 1977 Peyter osteoporosis Can Murat 1976 Cerrarioğlu cancer I can make it (descending)1979-1977-1976 but how can I write whole line..... and if I chose 1or 2 output should be (choose=1) Can Murat 1976 Cerrarioğlu cancer Kaya Osman 1979 Altınel cancer Pelin Mine 1977 Peyter osteoporosis how can I make it c recognize that "can" should before than "kaya" ?????? |
| ||
| Re: Hospital Record.. double array.. help last question :( I heard some bubblesort thing.. what is it.. is it suitable for me??? |
| ||
| Re: Hospital Record.. double array.. help Quote:
note: use the strcmp function to compare strings, < or > operator would do for the year (number). try googling on "bubble sort" "C" "tutorial" and see what comes up. |
| ||
| Re: Hospital Record.. double array.. help ok I am on it thnx...... |
| ||
| Re: Hospital Record.. double array.. help Anyone to help me??? I couldnt undertstand strcmp properly and I am stuck now :( I have to finish it this sunday :( please help...... I need advice :( lots of advices :( |
| ||
| Re: Hospital Record.. double array.. help strcmp() compares two strings and returns an integer that indicates whether string1 is less than string2, the same as string2, or greater than string2. For example char string1[] = "John"; As vijayan mentioned the bubble sort is the easiest to code and use. There are hundreds of examples if you learn to use google. Just read any of these links. |
| ||
| Re: Hospital Record.. double array.. help ok thats what I said... in here we can find same amount of words. But I dont want to find same word.. I want to find which one is first? I mean how can program recognize the john should be before than mary?? because it starts j which is before than m(mary) |
| ||
| Re: Hospital Record.. double array.. help Quote:
char john[] = "john" ; |
| ||
| Re: Hospital Record.. double array.. help Quote:
|
| All times are GMT -4. The time now is 5:27 pm. |
Forum system based on vBulletin Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
©2003 - 2010 DaniWeb® LLC