Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
glkink
/
C-programming
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a28598da
authored
3 years ago
by
glkink
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parent
c27cd130
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
funktabuleerimine
funktabuleerimine
0 → 100644
View file @
a28598da
#include <stdio.h>
#include <math.h>
int main()
{
double n, i, a, b, h, x, y;
printf("Funktsiooni tabuleerimine\n\n");
printf("h arvutatakse valemi järgi: \n h=(b-a)/n \n\n");
printf("Sisesta algväärtus a: ");
scanf("%lf", &a);
printf("Sisesta lõppväärtus b: ");
scanf("%lf", &b);
printf("Sisesta argument n: ");
scanf("%lf", &n);
h = (b-a)/n;
for(i=0; ((a+i-1)*((b-a)/n)) < b; i++)
{
x = a+i*h;
printf("%.2lf | ", x);
if((4-pow(x,2))==0) //ehk kui funktsiooni nimetaja võrdub nulliga
{
printf("antud kohal määramata\n");
}
else
{
y=((sqrt(pow(x,3))+4*pow(x,2))-(4-pow(x,2))); //siin on 23. funktsiooni valem
printf("%.3lf\n", y);
}
}
getchar();
getchar();
return 0;
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment