Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. void deltaWskaznik(int* a,int* b,int* c,int* x1,int* x2,int* x0,int* d)
  2. {
  3. printf("**********************************\n");
  4. printf("Podaj a:");
  5. scanf("%d",a);
  6. printf("Podaj b:");
  7. scanf("%d",b);
  8. printf("Podaj c:");
  9. scanf("%d",c);
  10. *d=(pow(*b,2))-(4* *a * *c);
  11. *x0=(-(*b))/(2*(*a));
  12. *x1=(-(*b)-pow(*d,1.0/2.0))/(2* *a);
  13. *x2=(-(*b)+pow(*d,1.0/2.0))/(2* *a);
  14. printf("***********************************\n");
  15. };
  16.  
  17. int main()
  18. {
  19. int a,b,c,x1,x2,x0,d;
  20. deltaWskaznik(&a,&b,&c,&x1,&x2,&x0,&d);
  21. 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);
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement