I tried it but I must be doing something wrong.
Code:
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main()
{
char first[80], second[80];
int lengthF, lengthS,i=0;
printf("\nEnter a word: ");
gets(first);
printf("\nEnter another word: ");
gets(second);
printf("\nNow enter a number:");
scanf("%d", &i);
lengthF = strlen(first);
lengthS = strlen(second);
first[lengthF]= toupper(first[lengthF]);
second[lengthS]= toupper(second[lengthS]);
if (strcmp(first, second) == 0)
puts("You entered the same words");
else
puts("The two words you entered were not the same");
if (lengthF == i)
printf("\n%s has %d letters in it", first, i);
else
printf("\nThe first word you entered does not have the same number of letters as the number you entered.");
if (lengthS == i)
printf("\n%s has %d letters in it", second, i);
else
printf("\nThe second word you entered does not have the same number of letters as the number you entered.");
getchar();
return 0;
}