diff --git a/codechef/reverse_the_number.cpp b/codechef/reverse_the_number.cpp index e69de29..b16be92 100644 --- a/codechef/reverse_the_number.cpp +++ b/codechef/reverse_the_number.cpp @@ -0,0 +1,44 @@ +// https://www.codechef.com/problems/FLOW007// SOLUTION NOT READY +#include +#include +using namespace std; + +void reverse_string() +{ + string number; + cin >> number; + int start_point = number.size()-1; + // If the last numebr is 0 + if(number[number.size()-1] =='0') + { + for(int i = number.size()-1; i>=0; i--) + { + if(number[i] != number[i-1]) + { + start_point = i-1; + break; + } + + } + } + + for(int i=start_point; i>=0; i--) + { + cout<>t; + for(int i =0; i