Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- funkcja_a(int a, int b, int c, int x);
- funkcja_b(int a, int b, int x);
- funkcja_c(int a, int b, int x);
- int main() {
- int a,b,c,d,x=0;
- printf("Podaj a,b,c,d rozdzielajac je spacja:");
- scanf("%d %d %d %d",&a,&b,&c,&d);
- printf("a=%d b=%d c=%d d=%d",a,b,c,d);
- printf("\nPodpunkt a: \n");
- while( funkcja_a( a, b, c, x ) <= d )
- {
- printf("x=%d ", x);
- ++x;
- }
- printf("\nPodpunkt b: \n");
- x=0;
- while( funkcja_b( a, b, x ) < c )
- {
- printf("x=%d ", x);
- ++x;
- }
- printf("\nPodpunkt c: \n");
- x=0;
- while( funkcja_b( a, b, x ) <= c )
- {
- printf("x=%d ", x);
- ++x;
- }
- return 0;
- }
- funkcja_a(int a, int b, int c, int x)
- {
- return fabs(a) * (pow( x, 2 )) + (b*x) + c;
- }
- funkcja_b(int a, int b, int x)
- {
- return 5 * (pow( x, 2 )) + (a*x) + b;
- }
- funkcja_c(int a, int b, int x)
- {
- return 5 * (pow( x, 2 )) + (a*x) + b;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement