-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproblemnumber34.cpp
More file actions
41 lines (37 loc) · 939 Bytes
/
problemnumber34.cpp
File metadata and controls
41 lines (37 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include<iostream>
#include <string>
#include<array>
#include<vector>
using namespace std;
// function conver 1 to i and 0to o and 5 to s
int correcttheerrorstext(string words) {
string word;
for (int i = 0; i < words.size(); i++)
{
if (words[i] == '1')
{
words[i] = 'I';
}
else if (words[i] == '5')
{
words[i] = 'S';
}
else if (words[i] == '0')
{
words[i] = 'O';
}
else
{
words[i];
}
}
cout << words;
return 0;
}
int main() {
correcttheerrorstext("R0BERT MERLE - THE DAY 0F THE D0LPH1N");
return 0;
}
/*Character recognition software is widely used to digitise printed texts. Thus the texts can be edited, searched and stored on a computer.
When documents (especially pretty old ones written with a typewriter), are digitised character recognition softwares often make mistakes.
Your task is correct the errors in the digitised text. You only have to handle the following mistakes:*/