Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
raliis
/
IAX0584
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
064ded3a
authored
Feb 14, 2018
by
raliis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete task1.c
parent
c588d4a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
61 deletions
andmebaas1/task1.c
andmebaas1/task1.c
deleted
100644 → 0
View file @
c588d4a2
#include <stdio.h>
#include <string.h>
typedef
struct
Andmed
{
char
eesnimi
[
30
];
char
perenimi
[
30
];
char
matrikkel
[
30
];
char
aineNimi
[
30
];
char
aineKood
[
30
];
int
tulemus
;
}
Andmed
;
void
output
();
int
main
()
{
FILE
*
tudengid
,
*
ained
,
*
eksamileht
;
Andmed
Data
;
Andmed
Tudengid
[
25
];
Andmed
Ained
[
25
];
int
i
=
0
;
tudengid
=
fopen
(
"tudengid.txt"
,
"r"
);
// avab failid lugemiseks
ained
=
fopen
(
"ained.txt"
,
"r"
);
// scanib sisse tudengi nime ja matriklinumbri
while
(
fscanf
(
tudengid
,
"%s %s %s"
,
Data
.
eesnimi
,
Data
.
perenimi
,
Data
.
matrikkel
)
!=
EOF
)
{
printf
(
"%s, %s, %s
\n
"
,
Data
.
eesnimi
,
Data
.
perenimi
,
Data
.
matrikkel
);
Tudengid
[
i
]
=
Data
;
i
++
;
}
i
=
0
;
// scanib sisse aine nime, aine koodi, tudnegi matriklinumbri ja selle tudengi tulemuse
while
(
fscanf
(
ained
,
"%s %s %s %d"
,
Data
.
aineNimi
,
Data
.
aineKood
,
Data
.
matrikkel
,
&
Data
.
tulemus
)
!=
EOF
)
{
printf
(
"%s, %s, %s, %d
\n
"
,
Data
.
aineNimi
,
Data
.
aineKood
,
Data
.
matrikkel
,
Data
.
tulemus
);
Ained
[
i
]
=
Data
;
i
++
;
}
i
=
0
;
return
0
;
}
void
output
()
{
FILE
*
eksamileht
;
eksamileht
=
fopen
(
"Pilet.txt"
,
"w"
);
}
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