Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
rakein
/
iag0582
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
4bf1a4bc
authored
Feb 22, 2017
by
rakein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete kolmnurgaasi.c
parent
eefad50b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
82 deletions
kolmnurgaasi.c
kolmnurgaasi.c
deleted
100644 → 0
View file @
eefad50b
#include <stdio.h>
#include "pindalaArvutaja.h"
#include "seeStruct.h"
#include "checkFile.h"
#include "v2ljastus.h"
#include "check3Nurk.h"
//#include "externalVariable.h"
extern
int
MAX
=
10
;
int
sisse
(
seeStruct
X
[],
int
);
int
main
(
void
)
{
seeStruct
A
[
MAX
];
seeStruct
B
[
MAX
];
seeStruct
C
[
MAX
];
FILE
*
S
;
int
i
=
0
;
double
pindalas
[
MAX
];
int
check
=
0
;
check
+=
sisse
(
A
,
1
);
check
+=
sisse
(
B
,
2
);
check
+=
sisse
(
C
,
3
);
if
(
check
!=
0
)
{
return
0
;
}
for
(
i
=
0
;
i
<
10
;
i
++
)
{
check
=
check3Nurk
(
A
,
B
,
C
,
i
);
if
(
check
==
0
)
{
pindalas
[
i
]
=
pindala
(
A
,
B
,
C
,
i
);
}
else
{
pindalas
[
i
]
=
0
;
}
}
v2ljastus
(
S
,
pindalas
);
return
0
;
}
int
sisse
(
seeStruct
X
[
MAX
],
int
param
)
{
FILE
*
andmed
;
int
check
=
0
;
int
i
=
0
;
if
(
param
==
1
)
{
andmed
=
fopen
(
"aAndmed.txt"
,
"r"
);
check
+=
checkFile
(
andmed
);
}
else
if
(
param
==
2
)
{
andmed
=
fopen
(
"bAndmed.txt"
,
"r"
);
check
+=
checkFile
(
andmed
);
}
else
{
andmed
=
fopen
(
"cAndmed.txt"
,
"r"
);
check
+=
checkFile
(
andmed
);
}
if
(
check
==
0
)
{
printf
(
"seda faili pole "
);
return
1
;
}
while
(
i
<
MAX
)
{
fscanf
(
andmed
,
"%lf %lf"
,
&
X
[
i
].
x
,
&
X
[
i
].
y
);
i
++
;
}
fclose
(
andmed
);
return
0
;
}
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