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 163c1f75 authored 8 years ago by trkall's avatar trkall
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

tunniyl 08.03 jaoks

parent 1b30055b master
Hide whitespace changes
Inline Side-by-side
Showing with 38 additions and 31 deletions
  • praktikum 2.2/F2.txt
  • praktikum 2.2/esimeneKT.c
  • praktikum 2.2/esimeneKT.exe
  • praktikum 2.2/esimeneKT.o
  • praktikum 2.2/esimenekodut66.docx
  • praktikum 2.2/esimenekodut66.zip
  • praktikum 2.2/functions.c.zargo
  • praktikum 2.2/main.c.zargo
  • praktikum 2.5/andmed.txt
  • praktikum 2.5/functions.c
  • praktikum 2.5/kt yl.c
  • praktikum 2.5/kt yl.exe
  • praktikum 2.5/kt yl.o
praktikum 2.2/F2.txt
View file @ 163c1f75
fgs Loom 13
fasgs Loom 132
gsa Lind 132
asgsa Lind 13
asf Kala 12
assdf Kala 12
sal Putukas 835
assal Putukas 832
This diff is collapsed. Click to expand it.
praktikum 2.2/esimeneKT.c
View file @ 163c1f75
......@@ -23,7 +23,11 @@ int main(void)
Ryhm *n = (Ryhm*)malloc(sizeof(Ryhm*));
F1 = fopen("F1.txt", "r");
if (chkFile(F1) == 0)
{
printf("Andmete fail puudub, sulgen programmi!\n");
return 0;
}
while(!feof(F1) || i <= MAX)
{
n = (Ryhm*)realloc(n, 35);
......
This diff is collapsed. Click to expand it.
praktikum 2.2/esimeneKT.exe
View file @ 163c1f75
No preview for this file type
This diff is collapsed. Click to expand it.
praktikum 2.2/esimeneKT.o
View file @ 163c1f75
No preview for this file type
This diff is collapsed. Click to expand it.
praktikum 2.2/esimenekodut66.docx 0 → 100644
View file @ 163c1f75
File added
This diff is collapsed. Click to expand it.
praktikum 2.2/esimenekodut66.zip 0 → 100644
View file @ 163c1f75
File added
This diff is collapsed. Click to expand it.
praktikum 2.2/functions.c.zargo 0 → 100644
View file @ 163c1f75
File added
This diff is collapsed. Click to expand it.
praktikum 2.2/main.c.zargo 0 → 100644
View file @ 163c1f75
File added
This diff is collapsed. Click to expand it.
praktikum 2.5/andmed.txt
View file @ 163c1f75
1.12
4.78
5.57
8.12
3.14
2.28
1.11
69.69
12.41
4.20
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/functions.c
View file @ 163c1f75
void FileSisse(double* Aarr, FILE *sisse)
int FileSisse(double* Aarr, FILE *sisse)
{
int i = 0;
int y;
while(fscanf(sisse, "%d", &y) != EOF)
double y;
while( !feof(sisse))
{
fscanf(sisse, "%lf", &y);
*(Aarr+i) = y;
i++;
}
return i-1;
}
void t66tlus(double *Aarr, double *Barr, int X)
void t66tlus(double* Aarr, double* Barr, int X, int pikkus)
{
int i;
int j = 0;
int k;
for(i=0;j<15;i++)
for(i=0;j<pikkus;i++)
{
*(Barr+i) = 0;
if(i !=0)
......@@ -30,6 +32,7 @@ void t66tlus(double *Aarr, double *Barr, int X)
*(Barr+i) /= pov(X, i);
}
}
}
int pov(int a, int b)
......@@ -39,4 +42,5 @@ int pov(int a, int b)
{
a*=a;
}
return a;
}
This diff is collapsed. Click to expand it.
praktikum 2.5/kt yl.c
View file @ 163c1f75
#include <stdio.h>
#include "functions.c"
int FileSisse(double* , FILE *sisse);
void t66tlus(double*, double*, int , int );
int pov(int , int );
int main(void)
{
FILE *sisse;
double *Aarr, *Barr;
int X, i;
double* Aarr;
double* Barr;
int X, i, pikkus;
sisse = fopen("andmed.txt", "r");
FileSisse(Aarr, sisse);
pikkus = FileSisse(Aarr, sisse);
fclose(sisse);
printf("Sisestage X:\n");
scanf("%d", &X);
t66tlus(Aarr, Barr, X);
for(i=0;i<15;i++)
t66tlus(Aarr, Barr, X, pikkus);
for(i=0;i<pikkus;i++)
{
printf("%0.2f", *(Barr+i));
}
......
This diff is collapsed. Click to expand it.
praktikum 2.5/kt yl.exe 0 → 100644
View file @ 163c1f75
File added
This diff is collapsed. Click to expand it.
praktikum 2.5/kt yl.o
View file @ 163c1f75
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