Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

added reverse.cpp and modified CONTRIBUTORS.md #662

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
| Shwetha Srikanth | <a href="https://github.com/shwe14101/">Shwetha Srikanth</a> | <a href="mailto:[email protected]">E-Mail</a> |
| Rishabh Srivastava | <a href="https://github.com/RishabhSrivastava1423">Rishabh Srivastava</a> | <a href="mailto:[email protected]">E-Mail</a> |
| Mitanshi Lodha | <a href="https://github.com/Mitanshilodha/">Mitanshi Lodha</a> | <a href="mailto:[email protected]">E-Mail</a> |
| Saket Ranjan Jha | <a href="https://github.com/Saketto">Saketto</a> | <a href="mailto:[email protected]">E-Mail</a> |

Thanks to everyone who helped in building this Repository :)

Expand Down
19 changes: 19 additions & 0 deletions CPP/reverse.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include<iostream>
#include<string.h>
using namespace std;
int main ()
{
char str[50], temp;
int i, j;
cout << "Enter a string : ";
gets(str);
j = strlen(str) - 1;
for (i = 0; i < j; i++,j--)
{
temp = str[i];
str[i] = str[j];
str[j] = temp;
}
cout << "\nReverse string : " << str;
return 0;//github username:Saketto
}