Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.65 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3.  
  4.     int i=0;
  5.     void funcion (int a,int b)
  6.     {
  7.     for (i=a; i<b; i++)                 //// como se cuando tiene que devolver un valor la funcion o cuando no y cual valor va a ser!!!!!
  8.         if (i%5==0)                     //// es decir como se cuando poner void o cuando int,....
  9.             printf ("%d\t", i);
  10.     }
  11. int main()
  12. {
  13.         int a,b,c;
  14.         printf ("Introducir intervalo entre a y b: a <enter> b<enter>\n");
  15.         scanf ("%d", &a);                                                                           ///// otra vez deprecated...............
  16.         scanf ("%d", &b);
  17.     if (a>b)
  18.     {
  19.         c=b;
  20.         b=a;
  21.         a=c;
  22.         funcion (a,b);
  23.     }
  24.     else
  25.     {
  26.         funcion (a,b);
  27.     }
  28.     system("PAUSE");
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement