Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
videid
/
iax0583
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
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
a09b6011
authored
Oct 22, 2017
by
videid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FINALE VERSION OF LAB7
parent
a4f10e4c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
lab7/lab7.C
lab7/lab7.C
View file @
a09b6011
#include <stdlib.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdio.h>
#include <cmath>
#define ARRAY_SIZE 25
#define ARRAY_SIZE 25
int
function
(
int
input
);
int
function
(
int
input
);
int
main
()
{
int
main
()
{
...
@@ -23,3 +24,36 @@ int test() {
...
@@ -23,3 +24,36 @@ int test() {
printf
(
"%d"
,
19
)
printf
(
"%d"
,
19
)
return
b
;
return
b
;
}
}
int
function
(
int
input2
)
:
;
h
=
int
1
i
=
int
0
j
=
int
1
k
=
int
0
l
=
int
0
arr
=
array
int
main2
()
{
while
(
h
<
input2
);
{
i
=
i
+
1
h
=
h
*
2
}
for
(
k
=
i
-
1
;
k
=
0
;
k
=
k
-
1
);
{
l
=
l
+
1
if
(
input2
-
pow
(
j
,
k
)
>
0
)
{
input2
=
input2
-
pow
(
j
,
k
)
arr
[
l
]
=
1
}
else
if
(
input2
-
pow
(
j
,
k
)
=
0
)
{
input2
=
0
arr
[
l
]
=
1
}
else
{
arr
[
l
]
=
0
}
printf
(
"%d"
,
arr
)
}
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