diff --git a/C++/Morse.cpp b/C++/Morse.cpp new file mode 100644 index 00000000..c6112c42 --- /dev/null +++ b/C++/Morse.cpp @@ -0,0 +1,33 @@ +#include +using namespace std; + +char 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',' '}; +string MorseAlphabet[] = {".-", "-...", "-.-.", "-..", ".", + "..-.", "--.", "....", "..", ".---", "-.-", ".-..", "--", "-.", + "---", ".--.", "--.-", ".-.", "...", "-", + "..-", "...-", ".--", "-..-", "-.--", + "--.."}; +char 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', ' '}; + +void translate(string *nama, int n){ + for(int i=0;i>n; + string nama[n];cin.ignore(); + for(int i=0;i