diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index e02c4a9..cc910cc 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -32,6 +32,7 @@ | Shwetha Srikanth | Shwetha Srikanth | E-Mail | | Rishabh Srivastava | Rishabh Srivastava | E-Mail | | Mitanshi Lodha | Mitanshi Lodha | E-Mail | +| Saket Ranjan Jha | Saketto | E-Mail | Thanks to everyone who helped in building this Repository :) diff --git a/CPP/reverse.cpp b/CPP/reverse.cpp new file mode 100644 index 0000000..7158d60 --- /dev/null +++ b/CPP/reverse.cpp @@ -0,0 +1,19 @@ +#include +#include +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 +}