Skip to content

Commit 2a5503a

Browse files
Restyled by prettier-markdown
1 parent 58edf10 commit 2a5503a

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

dsa-solutions/gfg-solutions/Basic/0093.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ description: "This document covers methods to replace all occurrences of the dig
1414
Given a number N. The task is to complete the function **convertFive()** which replaces all zeros in the number with 5 and returns the number.
1515

1616
### Examples:
17+
1718
**Example 1:**
19+
1820
```
1921
Input
2022
2
@@ -49,7 +51,9 @@ Since this is a functional problem you don't have to worry about input, you just
4951
- $1 <= N <= 10^4$
5052

5153
## Solution
54+
5255
### Python
56+
5357
```python
5458
def convertFive(self,n):
5559
num_str = str(n)
@@ -63,6 +67,7 @@ def convertFive(self,n):
6367
```
6468

6569
### Java
70+
6671
```java
6772
public static int convertFive(int n){
6873
String numStr = String.valueOf(n);
@@ -71,7 +76,7 @@ public static int convertFive(int n){
7176
char currentChar = numStr.charAt(i);
7277
if (currentChar == '0') {
7378
result.append('5');
74-
}
79+
}
7580
else {
7681
result.append(currentChar);
7782
}
@@ -82,6 +87,7 @@ public static int convertFive(int n){
8287
```
8388

8489
### C++
90+
8591
```cpp
8692
int convertFive(int n) {
8793
string numStr = to_string(n);
@@ -96,6 +102,7 @@ int convertFive(int n) {
96102
```
97103
98104
### C
105+
99106
```c
100107
int convertFive(int n) {
101108
int result = 0;
@@ -104,7 +111,7 @@ int convertFive(int n) {
104111
int digit = n % 10;
105112
if (digit == 0) {
106113
result += 5 * position;
107-
}
114+
}
108115
else {
109116
result += digit * position;
110117
}

src/pages/me.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ description: In this page, I will introduce myself.
44
hide_table_of_contents: true
55
---
66

7-
87
import Chatbot from "../components/Chatbot";
98

109
# Introduction (परिचयः) 🙏
@@ -118,4 +117,4 @@ import Chatbot from "../components/Chatbot";
118117
</div>
119118
</div>
120119

121-
<Chatbot />
120+
<Chatbot />

0 commit comments

Comments
 (0)