Commit a09b6011 by videid

FINALE VERSION OF LAB7

parent a4f10e4c
Showing with 34 additions and 0 deletions
#include <stdlib.h>
#include <stdio.h>
#include <cmath>
#define ARRAY_SIZE 25
int function(int input);
int main() {
......@@ -23,3 +24,36 @@ int test() {
printf("%d",19 )
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)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment