0
Compare the letters
I have to write a program which takes a word which has 4 letters, then give us its letters by alphabet arrangement for example: Laya~>aaly I don’t know how i can compare the letters
7 odpowiedzi
+ 1
Laya Mousavi
Do you need to convert the input to lowercase before comparing and sorting the characters in the input string?
I see you wrote "Laya" -> "aaly"
+ 1
Laya Mousavi
Check this documentation for ctype.h header. The header provides functions you can use to verify whether a character was alphabetical, numeric etc. Also how to tell whether the character was a lowercase or uppercase, and to convert between upper to lowercase, vice versa.
http://www.cplusplus.com/reference/cctype/
To sort the string (after converting it to lowercase), you can utilise `qsort` function, provided in stdlib.h header. You can learn how to use the function from the following reference:
https://en.cppreference.com/w/c/algorithm/qsort
Good luck! 👍
+ 1
Ipang thank u so much🙋🏻♀️🙋🏻♀️
+ 1
You're welcome Laya Mousavi 😁
So, you will post the code here when you're done or what? cause I'd like to see it.
+ 1
You're welcome Laya Mousavi 😁
So, you will post the code here when you're done or what? cause I'd like to see it.
0
greedy fox they work but we didn’t stady these
we have stadied <stdio.h> <math.h>
i have to mail my exercises in these format , to our teacher
i don’t know how i can write this program
0
Ipang actually i don’t know how i can compare the letters
how i can convert the input to lowercase?!