nikolas_serafini

Lista 4 - Exercício 25

Jun 22nd, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.49 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main()
  5. {  
  6.     int i;
  7.     char phrase1[100],phrase2[100];
  8.      
  9.     printf("Entre com uma frase :\n");
  10.     gets(phrase1);
  11.     printf("Entre com outra frase :\n");
  12.     gets(phrase2);
  13.  
  14.     if (strlen(phrase1) > strlen (phrase2))
  15.         printf("Primeira frase eh maior!\n");
  16.     else if (strlen(phrase2) > strlen(phrase1))
  17.         printf("Segunda frase eh maior!\n");
  18.     else
  19.         printf("Frases de mesmo tamanho!\n");
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment