Txerrinko

NO LO ENTIENDO !! limite superior y limite inferior

Jul 26th, 2011
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6.   int li , ls , n;
  7.  
  8.   fflush(stdin);
  9.   printf("Introduzca el limite inferior \n");
  10.   scanf("%d",&li);
  11.  
  12.   fflush(stdin);
  13.   printf("Introduzca el limite superior \n");
  14.   scanf("%d",&ls);
  15.  
  16.   for ( n=li ; n <= ls ; n++)
  17.   {
  18.       if ( n%2 == 0)
  19.       printf("\n %d",n);
  20. }
  21.   /*
  22.   {
  23.       else  
  24.       printf("%d",n);
  25. }
  26.   */  
  27.  
  28.  
  29.  
  30.   system("PAUSE"); 
  31.   return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment