Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int *f(float a, float b,int *c)
- {
- *c=(int)b - (int)a;
- if(*c>0)
- return (int *)malloc(*c *sizeof(int));
- return NULL;
- }
- int main()
- {
- int rezultat;
- float a,b;
- // a=2,65;
- // b=3,5;
- scanf("<%f;%f>",&a,&b);
- int *tab=f(a,b,&rezultat);
- if(tab!=NULL)
- printf("%d\n",rezultat);
- return 0;
- printf("Hello world!\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement