Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
wacksientrist authored May 9, 2023
1 parent 4127c6c commit 2655046
Show file tree
Hide file tree
Showing 69 changed files with 1,112 additions and 0 deletions.
Binary file added Orchid/Code/Comp1/Instance
Binary file not shown.
95 changes: 95 additions & 0 deletions Orchid/Code/Comp1/Instance.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

int main(int argc, char const *argv[])
{
FILE *A_fil = fopen("Instrc_r1.txt", "r");
FILE *B_fil = fopen("Instrc_r2.txt", "r");
FILE *Type_fil = fopen("Instrc_r3.txt", "r");
FILE *O_fil = fopen("Instrc_s.txt", "w");

char A_char[5];
char B_char[5];
char Type_char[5];
char O_char[5];

double A_Float;
double B_Float;
double O_Float;

fgets(Type_char, 4, Type_fil);

if (strcmp(Type_char, "IF=") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

if (strcmp(A_char, B_char) == 0)
{
strcpy(O_char, "T");
}
else
{
strcpy(O_char, "F");
}
}
if (strcmp(Type_char, "IF!") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

if (strcmp(A_char, B_char) == 0)
{
strcpy(O_char, "F");
}
else
{
strcpy(O_char, "T");
}
}
if (strcmp(Type_char, "A") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

A_Float = atof(A_char);
B_Float = atof(B_char);

gcvt((A_Float + B_Float), 4, O_char);
}
if (strcmp(Type_char, "S") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

A_Float = atof(A_char);
B_Float = atof(B_char);

gcvt((A_Float - B_Float), 4, O_char);
}
if (strcmp(Type_char, "M") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

A_Float = atof(A_char);
B_Float = atof(B_char);

gcvt((A_Float * B_Float), 4, O_char);
}
if (strcmp(Type_char, "D") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

A_Float = atof(A_char);
B_Float = atof(B_char);

gcvt((A_Float / B_Float), 4, O_char);
}
fprintf(O_fil, "%s",O_char);

return 0;
}
20 changes: 20 additions & 0 deletions Orchid/Code/Comp1/Instance.dSYM/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.Instance</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Binary file not shown.
1 change: 1 addition & 0 deletions Orchid/Code/Comp1/Instrc_r1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!
1 change: 1 addition & 0 deletions Orchid/Code/Comp1/Instrc_r2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
1 change: 1 addition & 0 deletions Orchid/Code/Comp1/Instrc_r3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IF=
1 change: 1 addition & 0 deletions Orchid/Code/Comp1/Instrc_s.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
F
10 changes: 10 additions & 0 deletions Orchid/Code/Comp1/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
cd Comp1
gcc -Ofast -g Instance.c -o Instance


while true
do
./Instance
#python3 Instance.py
done
Binary file added Orchid/Code/Comp2/Instance
Binary file not shown.
95 changes: 95 additions & 0 deletions Orchid/Code/Comp2/Instance.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

int main(int argc, char const *argv[])
{
FILE *A_fil = fopen("Instrc_r1.txt", "r");
FILE *B_fil = fopen("Instrc_r2.txt", "r");
FILE *Type_fil = fopen("Instrc_r3.txt", "r");
FILE *O_fil = fopen("Instrc_s.txt", "w");

char A_char[5];
char B_char[5];
char Type_char[5];
char O_char[5];

double A_Float;
double B_Float;
double O_Float;

fgets(Type_char, 4, Type_fil);

if (strcmp(Type_char, "IF=") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

if (strcmp(A_char, B_char) == 0)
{
strcpy(O_char, "T");
}
else
{
strcpy(O_char, "F");
}
}
if (strcmp(Type_char, "IF!") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

if (strcmp(A_char, B_char) == 0)
{
strcpy(O_char, "F");
}
else
{
strcpy(O_char, "T");
}
}
if (strcmp(Type_char, "A") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

A_Float = atof(A_char);
B_Float = atof(B_char);

gcvt((A_Float + B_Float), 4, O_char);
}
if (strcmp(Type_char, "S") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

A_Float = atof(A_char);
B_Float = atof(B_char);

gcvt((A_Float - B_Float), 4, O_char);
}
if (strcmp(Type_char, "M") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

A_Float = atof(A_char);
B_Float = atof(B_char);

gcvt((A_Float * B_Float), 4, O_char);
}
if (strcmp(Type_char, "D") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

A_Float = atof(A_char);
B_Float = atof(B_char);

gcvt((A_Float / B_Float), 4, O_char);
}
fprintf(O_fil, "%s",O_char);

return 0;
}
20 changes: 20 additions & 0 deletions Orchid/Code/Comp2/Instance.dSYM/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.Instance</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Binary file not shown.
1 change: 1 addition & 0 deletions Orchid/Code/Comp2/Instrc_r1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
wC
1 change: 1 addition & 0 deletions Orchid/Code/Comp2/Instrc_r2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
1 change: 1 addition & 0 deletions Orchid/Code/Comp2/Instrc_r3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IF=
1 change: 1 addition & 0 deletions Orchid/Code/Comp2/Instrc_s.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
F
10 changes: 10 additions & 0 deletions Orchid/Code/Comp2/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
cd Comp2
gcc -Ofast -g Instance.c -o Instance


while true
do
./Instance
#python3 Instance.py
done
Binary file added Orchid/Code/Comp3/Instance
Binary file not shown.
95 changes: 95 additions & 0 deletions Orchid/Code/Comp3/Instance.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

int main(int argc, char const *argv[])
{
FILE *A_fil = fopen("Instrc_r1.txt", "r");
FILE *B_fil = fopen("Instrc_r2.txt", "r");
FILE *Type_fil = fopen("Instrc_r3.txt", "r");
FILE *O_fil = fopen("Instrc_s.txt", "w");

char A_char[5];
char B_char[5];
char Type_char[5];
char O_char[5];

double A_Float;
double B_Float;
double O_Float;

fgets(Type_char, 4, Type_fil);

if (strcmp(Type_char, "IF=") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

if (strcmp(A_char, B_char) == 0)
{
strcpy(O_char, "T");
}
else
{
strcpy(O_char, "F");
}
}
if (strcmp(Type_char, "IF!") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

if (strcmp(A_char, B_char) == 0)
{
strcpy(O_char, "F");
}
else
{
strcpy(O_char, "T");
}
}
if (strcmp(Type_char, "A") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

A_Float = atof(A_char);
B_Float = atof(B_char);

gcvt((A_Float + B_Float), 4, O_char);
}
if (strcmp(Type_char, "S") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

A_Float = atof(A_char);
B_Float = atof(B_char);

gcvt((A_Float - B_Float), 4, O_char);
}
if (strcmp(Type_char, "M") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

A_Float = atof(A_char);
B_Float = atof(B_char);

gcvt((A_Float * B_Float), 4, O_char);
}
if (strcmp(Type_char, "D") == 0)
{
fgets(A_char, 4, A_fil);
fgets(B_char, 4, B_fil);

A_Float = atof(A_char);
B_Float = atof(B_char);

gcvt((A_Float / B_Float), 4, O_char);
}
fprintf(O_fil, "%s",O_char);

return 0;
}
Loading

0 comments on commit 2655046

Please sign in to comment.