Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void deltaWskaznik(int* a,int* b,int* c,int* x1,int* x2,int* x0,int* d)
- {
- printf("**********************************\n");
- printf("Podaj a:");
- scanf("%d",a);
- printf("Podaj b:");
- scanf("%d",b);
- printf("Podaj c:");
- scanf("%d",c);
- *d=(pow(*b,2))-(4* *a * *c);
- *x0=(-(*b))/(2*(*a));
- *x1=(-(*b)-pow(*d,1.0/2.0))/(2* *a);
- *x2=(-(*b)+pow(*d,1.0/2.0))/(2* *a);
- printf("***********************************\n");
- };
- int main()
- {
- int a,b,c,x1,x2,x0,d;
- deltaWskaznik(&a,&b,&c,&x1,&x2,&x0,&d);
- printf("a= %d \n b= %d \n c= %d \n delta=%d \n x0=%d \n x1=%d \n x2=%d ",a,b,c,d,x0,x1,x2);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement