Hello everybody! I need a program that randomly converts a letter, from the upper case to the lower case and vice versa depending on a parameter p:
If p <1, then the letter will be converted to the uppercase <-> lowercase or vice versa.
If p = 1, then it will remain unchanged
I did the string transformation with atof: p = atof (str);
And the random generation of a number between 0 and 1, withIn function main, my program must to start with srand(42);Code:float sample = rand ()% 100 / 99.0;
Input: It's raining outside
Output: It'S rAiNIng oUTsiDe