Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CTasks1
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
CTasks1
Commits
c2313242
Commit
c2313242
authored
Jan 13, 2023
by
elijah vasquez
🦍
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
I DID IT
parent
dbeaad87
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
14 deletions
+22
-14
morse.c
morse.c
+22
-13
morse.exe
morse.exe
+0
-0
tempCodeRunnerFile.c
tempCodeRunnerFile.c
+0
-1
No files found.
morse.c
View file @
c2313242
// Task 9
// Task 9
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.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
()
{
int
main
(){
char
morseCode
[
26
][
6
]
=
{
char
*
morseCode
[]
=
{
".-"
,
//A
".-"
,
//A
"-..."
,
//B
"-..."
,
//B
"-.-."
,
//C
"-.-."
,
//C
...
@@ -33,15 +34,23 @@ int main(){
...
@@ -33,15 +34,23 @@ int main(){
"-.--"
,
//Y
"-.--"
,
//Y
"--.."
,
//Z
"--.."
,
//Z
};
};
char
keyInput
[
5
0
];
char
keyInput
[
100
0
];
//enum alphaBet keyInput
;
size_t
i
=
0
;
printf
(
"Enter string: "
);
printf
(
"Enter string: "
);
scanf
(
"%s"
,
keyInput
);
gets
(
keyInput
);
printf
(
"
\n
decoded: %s"
,
keyInput
);
for
(
int
i
=
0
;
i
<
26
;
i
++
){
printf
(
"%s
\n
"
,
morseCode
[
i
]);
}
return
0
;
while
(
keyInput
[
i
]
!=
'\0'
)
{
if
(
keyInput
[
i
]
!=
' '
)
{
printf
(
"%s
\n
"
,
morseCode
[
tolower
(
keyInput
[
i
]
-
97
)]);
}
if
(
keyInput
[
i
]
==
' '
)
{
printf
(
"
\n
"
);
}
i
++
;
}
return
0
;
}
}
morse.exe
View file @
c2313242
No preview for this file type
tempCodeRunnerFile.c
deleted
100644 → 0
View file @
dbeaad87
enum
engAlphabet
{
a
,};
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