In this project you have to sort all the people given in “disordered_people.txt”. You will get the sort column from the user and write the ordered people in “orderedFile.txt”.
Standart sort is as shown:
ID | NAME | SIR NAME | |
4564765….. | Andria | MALLE | [email protected] |
The row selected by the user will be placed on the first column and the order will be made according to it. Sample:
Give a Sort Metric (I = ID N= NAME | S= SIR NAME | M=MAIL) : M |
File output file will be as shown:MAIL ID NAME | SIR NAME | |
[email protected] 4564765 Andria….. | MALLE | |
Give a Sort Metric (I = ID N= NAME | S= SIR NAME | M=MAIL) : N |
File output file will be as shown:NAME ID SIR NAME | ||
Andria 4564765 MALLE…… | [email protected] |
The order of ascii table will be used in the sorting. Detailed in the next page.
Rules:
- Console inputs must be accept upper case charcter “N,M,İ,S”. Can be accept lower case character “n,m,i,s”
- Output file name: txt
- Input file name is: txt
Sorting Example :
Given char arrays: Aa, aaa, ve Aaa, bb, a, c, a a, 112, 45 Charcter on asci table :
Character | Ascii (Decimal) |
A | 65 |
a | 97 |
b | 98 |
SPACE “ ” | 32 |
c | 99 |
1 | 49 |
2 | 50 |
4 | 52 |
5 | 53 |
Unordered char arrays:
Sample char array | As Asci Number |
Aa | 65 ,97 |
aaa | 97, 97, 97 |
Aaa | 65 ,97 |
bb | 98, 98 |
a | 97 |
c | 99 |
a a | 97, 32, 97 |
112 | 49, 49, 50 |
45 | 52, 53 |
Ordered char arrays:
Sample Char array | As Asci Number |
112 | 49, 49, 50 |
45 | 52, 53 |
Aa | 65 ,97 |
Aaa | 65 ,97, 97 |
a | 97 |
a a | 97, 32, 97 |
aaa | 97, 97, 97 |
bb | 98, 98 |
c | 99 |
Good Luck!
Reviews
There are no reviews yet.