Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CTasks3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
elijah vasquez
CTasks3
Commits
4a354350
Commit
4a354350
authored
Jan 14, 2023
by
elijah vasquez
🦍
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pasted code
parents
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
main.c
main.c
+41
-0
main.exe
main.exe
+0
-0
No files found.
main.c
0 → 100644
View file @
4a354350
#include <stdio.h>
typedef
struct
point
{
float
x
;
float
y
;
}
point
;
typedef
struct
square
{
point
corners
[
4
];
}
square
;
void
setPoint
(
square
*
,
int
,
float
,
float
);
void
printSquare
(
square
);
int
main
(
void
)
{
square
my_square
;
setPoint
(
&
my_square
,
0
,
1
.
0
,
1
.
0
);
setPoint
(
&
my_square
,
1
,
4
.
0
,
1
.
0
);
setPoint
(
&
my_square
,
2
,
4
.
0
,
4
.
0
);
setPoint
(
&
my_square
,
3
,
1
.
0
,
4
.
0
);
printSquare
(
my_square
);
return
0
;
}
void
setPoint
(
square
*
a_square
,
int
corner
,
float
x
,
float
y
)
{
a_square
->
corners
[
corner
].
x
=
x
;
a_square
->
corners
[
corner
].
y
=
y
;
}
void
printSquare
(
square
a_square
)
{
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
printf
(
"Corner %d (%f,%f)
\n
"
,
i
,
a_square
.
corners
[
i
].
x
,
a_square
.
corners
[
i
].
y
);
}
}
main.exe
0 → 100644
View file @
4a354350
File added
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