View previous topic :: View next topic
|
Author |
Message |
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
Hello, how are you?
Input file
Code: |
4425480000006065 . -278.12 . 2021-07-20
4425480000002080 . 3000.00 . 2021-07-19
4425480000002080 . -3000.00 . 2021-07-19
4425480000000299 . -72.00 . 2021-07-19
4425480000007267 . 1169.50 . 2021-07-19
4425480000007267 . -1169.50 . 2021-07-19
4425480000006065 . -23278.12 . 2021-07-20
|
I have to erase those registers that are equal, no matter if one of the number is negtive
For example, in this case I have to eliminate the 2, 3, 5 and 6 register.
I was thinking in pass them to zd format and with that erase the negative symbol but there are negative numbers not to be erased, I have to only erase those that are repeating.
Desired output:
Code: |
4425480000006065 . -278.12 . 2021-07-20
4425480000000299 . -72.00 . 2021-07-19
4425480000006065 . -23278.12 . 2021-07-20
|
Have you any idea?
Thanks. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2023 Location: USA
|
|
|
|
#1. Plan the logical way: what is the sequence of elementary steps to do what you need? (unrelated to neither SORT, nor whatever else). This is called with the word “algorithm”.
#2. Try to find out the available SORT operations to implement your algorithm.
Otherwise your question sounds as: “Please, do my own job for me!”
BTW, what is the word “register” in your terminology???
You are removing 3000.00 and -3000.00
What if there were 3000.00 and 3000.00? They are EQUAL, too!
Etc, etc… 100 questions. Lazy to print all of them - this should be your responsibility to explain this clearly.
Quote: |
Have you any idea? |
This is a question for yourself, not for the forum… |
|
Back to top |
|
|
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
sergeyken wrote: |
#1. Plan the logical way: what is the sequence of elementary steps to do what you need? (unrelated to neither SORT, nor whatever else). This is called with the word “algorithm”.
#2. Try to find out the available SORT operations to implement your algorithm.
Otherwise your question sounds as: “Please, do my own job for me!”
BTW, what is the word “register” in your terminology??? |
Record, excuse me. |
|
Back to top |
|
|
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
I found a way to solve this, I did not ask no-one to do my job, simple give some clue or idea, but well, it seems that everytime I make some question you are here to reproach me something while other forum members simple give some idea or clue to research. As I said, i do not want code, simple a clue, is evident that I search the forum and I did not find any casuistry similar to this. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2023 Location: USA
|
|
|
|
Ali_gezer wrote: |
I found a way to solve this, I did not ask no-one to do my job, simple give some clue or idea, but well, it seems that everytime I make some question you are here to reproach me something while other forum members simple give some idea or clue to research. As I said, i do not want code, simple a clue, is evident that I search the forum and I did not find any casuistry similar to this. |
I gave you the clear idea of two obvious steps. You decided to ignore it; it’s up to you. |
|
Back to top |
|
|
|