For example:
% a.out Enter a string: The quick brown fox jumped over the lazy dog. Th qck brwn fx jmpd vr th lzy dg. % a.out Enter a string: It was the best of times. It was the worst of times. t ws th bst f tms. t ws th wrst f tms.
For example:
% a.out The quick brown fox jumped over the lazy dog. .god yzal eht revo depmuj xof nworb kciuq ehT It was the best of times. It was the worst of times. .semit fo tsrow eht saw tI .semit fo tseb eht saw tI This is the last line. .enil tsal eht si sihT
Recall that the function rand() yields a pseudom-random int.
Write a C program which asks the user how many times to roll a pair of 6 sided dice and prints a tally of all the numbers rolled. Don't output zero tallies. The output from your program should look like this:
% a.out How many times should I roll the dice? 8 You rolled 4 and 6 = 10 You rolled 1 and 2 = 3 You rolled 4 and 6 = 10 You rolled 6 and 5 = 11 You rolled 3 and 6 = 9 You rolled 1 and 2 = 3 You rolled 5 and 4 = 9 You rolled 3 and 6 = 9 2 3s were rolled 3 9s were rolled 2 10s were rolled 1 11s were rolled
Use an array to store the tallies.