Commit dbeaad87 authored by elijah vasquez's avatar elijah vasquez 🦍

commit of the century

parent 813ab56e
// Task 1
#include <stdio.h> #include <stdio.h>
int main(void) { int main(void) {
......
// Task 7
#include <stdio.h> #include <stdio.h>
int midFunction(int x, int y, int z) { int midFunction(int x, int y, int z) {
......
// Task 9
#include <stdio.h>
#include <string.h>
enum alphaBet{a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z};
int main(){
char *morseCode[] = {
".-", //A
"-...", //B
"-.-.", //C
"-..", //D
".", //E
"..-.", //F
"--.", //G
"....", //H
"..", //I
".---", //J
"-.-", //K
".-..", //L
"--", //M
"-.", //N
"---", //O
".--.", //P
"--.-", //Q
".-.", //R
"...", //S
"-", //T
"..-", //U
"...-", //V
".--", //W
"-..-", //X
"-.--", //Y
"--..", //Z
};
char keyInput[50];
//enum alphaBet keyInput;
printf("Enter string: ");
scanf("%s", keyInput);
printf("\ndecoded: %s", keyInput);
for (int i = 0; i < 26; i++){
printf("%s\n", morseCode[i]);
}
return 0;
}
No preview for this file type
// Task 2 + 3 + 4 + 5
#include <stdio.h> #include <stdio.h>
int main(void) { int main(void) {
......
// Task 8
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
......
enum engAlphabet {a,};
// Task 6
#include <stdio.h> #include <stdio.h>
enum days {mon, tue, wed, thu, fri, sat, sun}; enum days {mon, tue, wed, thu, fri, sat, sun};
...@@ -7,5 +8,6 @@ int main(){ ...@@ -7,5 +8,6 @@ int main(){
int numbers[7] = {10, 15, 5, 60, 20, 40, 30}; int numbers[7] = {10, 15, 5, 60, 20, 40, 30};
today = thu; today = thu;
printf("%d", today[numbers]); printf("%d", today[numbers]);
return 0; return 0;
} }
No preview for this file type
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 to comment