0% found this document useful (0 votes)
19 views

LLProgramare Alexa

Uploaded by

maxlab
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

LLProgramare Alexa

Uploaded by

maxlab
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

#include<stdio.

h>

#include<math.h>

int main()

float x1,x2,px,a,b,c;

float x,F;

int n;

printf("Input x1 : ");

scanf("%f",&x1);

printf("Input x2 : ");

scanf("%f",&x2);

printf("Input px : ");

scanf("%f",&px);

printf("Input a : ");

scanf("%f",&a);

printf("Input b : ");

scanf("%f",&b);

printf("Input c : ");

scanf("%f",&c);

x = x1;

n = 0;
printf("\n\t Results : \n");

while (x < x2)

n = n + 1;

if ((x < c ) && (a != 0))

F = (a*sin(x-(log(x))/(c+b)));

else if ((x < c ) && (a == 0))

F = ((x-a*(x*x))/(x-b-sin(c)));

else

F = (3*x+(a+(x*x))/c);

printf("%i: x = %.3f \t F = %.3f \n", n,x,F);

x = x + px;

return 132;

You might also like