nikolas_serafini

Lista 3 - Exercício 8

Jun 11th, 2013
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int low,high,i;
  6.  
  7.     printf("Entre com o numero minimo e maximo do intervalo, respectivamente :\n");
  8.     scanf("%d %d",&low,&high);
  9.     if (low>=high)
  10.     {
  11.     printf("Intervalo incoerente!\n");
  12.     return 0;
  13.     }
  14.  
  15.     for (i = low+1; i < high; i++)
  16.     {
  17.         if (i%2 != 0)
  18.         {
  19.             printf("%d\n",i);
  20.         }
  21.     }
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment