Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
mikolo
/
paaristoo
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
07314470
authored
Feb 13, 2023
by
mikolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
ceafbc7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
88 additions
and
0 deletions
paaristoo.c
paaristoo.c
0 → 100644
View file @
07314470
/*oo andmebaas vähemalt 5 autoga
char mark,
char mudel,
char numbrimärk,
int väljalaske aasta,
char kubatuur
ning auto omanike baas, kus on teada:
char inimese isikukood,
char nimi.
Leia kõige võimsam, kõige vanem ja kõige uuem auto.
Ühel inimesel võib olla mitu autot, kuid üks auto ei tohi kuuluda mitmele inimesele.*/
#include <stdio.h>
typedef
struct
{
char
mark
[
256
];
char
mudel
[
256
];
char
numbrim
ä
rk
[
6
];
int
v
ä
ljalaske
aasta
;
char
kubatuur
[
256
];
}
autod
;
typedef
struct
{
char
inimese
isikukood
[
31
];
char
nimi
[
31
];
}
isik
;
int
kontrollifail
(
FILE
*
);
int
voimsam
();
int
koigevanem
();
int
koigeuuem
();
int
main
(
void
)
{
isik
inimesed
[],
*
mehed
,
*
naised
;
FILE
*
autod
;
autod
=
fopen
(
nimi
,
"r"
);
if
(
kontrollifail
(
autod
)
==
0
)
{
printf
(
"Pole faili.
\n
"
);
return
1
;
}
return
0
;
}
int
kontrollifail
(
FILE
autod
)
{
if
(
autod
.
txt
==
NULL
){
return
0
;
}
return
1
;
}
int
voimsam
()
{
}
int
koigevanem
()
{
}
int
koigeuuem
()
{
}
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