We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b1f9e8 commit 5139f04Copy full SHA for 5139f04
32B - Borze.cpp
@@ -0,0 +1,31 @@
1
+#include<bits/stdc++.h>
2
+using namespace std;
3
+
4
+// Code Written By: Vikash Patel
5
6
+int main()
7
+{
8
+ string Bcode;
9
+ cin>>Bcode;
10
+ string decoded;
11
+ int i=0;
12
+ while(i!=Bcode.size())
13
+ {
14
+ if(Bcode[i]=='.')
15
16
+ decoded+="0";
17
+ i++;
18
+ }
19
+ else if(Bcode.substr(i,2)=="-.")
20
21
+ decoded+="1";
22
+ i+=2;
23
24
+ else
25
26
+ decoded+="2";
27
28
29
30
+ cout<<decoded<<endl;
31
+}
0 commit comments