Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

trkall / iag0582

  • This project
    • Loading...
  • Sign in
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 1b30055b authored 8 years ago by trkall's avatar trkall
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

tunniyl

parent f5bb5b01 master
Show whitespace changes
Inline Side-by-side
Showing with 73 additions and 0 deletions
  • praktikum 2.2/esimeneKT
  • praktikum 2.2/esimeneKT.c
  • praktikum 2.2/esimeneKT.o
  • praktikum 2.5/andmed.txt
  • praktikum 2.5/andmed.txt~
  • praktikum 2.5/functions.c
  • praktikum 2.5/kt yl
  • praktikum 2.5/kt yl.c
  • praktikum 2.5/kt yl.o
  • praktikum2.4/kuupv
  • praktikum2.4/kuupv.o
praktikum 2.2/esimeneKT
View file @ 1b30055b
No preview for this file type
This diff is collapsed. Click to expand it.
praktikum 2.2/esimeneKT.c
View file @ 1b30055b
......@@ -36,5 +36,6 @@ int main(void)
faili_lugemine(pikkus, str2, F2, n);
faili_lugemine(pikkus, str3, F2, n);
faili_lugemine(pikkus, str4, F2, n);
free(n);
return 0;
}
This diff is collapsed. Click to expand it.
praktikum 2.2/esimeneKT.o
View file @ 1b30055b
No preview for this file type
This diff is collapsed. Click to expand it.
praktikum 2.5/andmed.txt 0 → 100644
View file @ 1b30055b
1.12
4.78
5.57
8.12
3.14
2.28
1.11
69.69
12.41
4.20
This diff is collapsed. Click to expand it.
praktikum 2.5/andmed.txt~ 0 → 100644
View file @ 1b30055b
This diff is collapsed. Click to expand it.
praktikum 2.5/functions.c 0 → 100644
View file @ 1b30055b
void FileSisse(double* Aarr, FILE *sisse)
{
int i = 0;
int y;
while(fscanf(sisse, "%d", &y) != EOF)
{
*(Aarr+i) = y;
i++;
}
}
void t66tlus(double *Aarr, double *Barr, int X)
{
int i;
int j = 0;
int k;
for(i=0;j<15;i++)
{
*(Barr+i) = 0;
if(i !=0)
{
for(k=j;k<=i+1;k++)
{
*(Barr+i) += *(Aarr+j);
}
j=k;
*(Barr+i) *= pov(-1, i);
*(Barr+i) /= pov(X, i);
}
}
}
int pov(int a, int b)
{
int i;
for(i=0;i<b;i++)
{
a*=a;
}
}
This diff is collapsed. Click to expand it.
praktikum 2.5/kt yl 0 → 100644
View file @ 1b30055b
File added
This diff is collapsed. Click to expand it.
praktikum 2.5/kt yl.c 0 → 100644
View file @ 1b30055b
#include <stdio.h>
#include "functions.c"
int main(void)
{
FILE *sisse;
double *Aarr, *Barr;
int X, i;
sisse = fopen("andmed.txt", "r");
FileSisse(Aarr, sisse);
printf("Sisestage X:\n");
scanf("%d", &X);
t66tlus(Aarr, Barr, X);
for(i=0;i<15;i++)
{
printf("%0.2f", *(Barr+i));
}
return 0;
}
This diff is collapsed. Click to expand it.
praktikum 2.5/kt yl.o 0 → 100644
View file @ 1b30055b
File added
This diff is collapsed. Click to expand it.
praktikum2.4/kuupv 0 → 100644
View file @ 1b30055b
File added
This diff is collapsed. Click to expand it.
praktikum2.4/kuupv.o
View file @ 1b30055b
No preview for this file type
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment