+ 2

Write program in c++to view the inverse of this number 234567?

11th Mar 2017, 3:57 PM
Bts...
Bts... - avatar
2 odpowiedzi
+ 2
# include <iostream> using namespace std; int main () { int inverse=0; int num; cout <<"enter number "; cin >>num; while (num!=0) { inverse=inverse*10; inverse=inverse+num%10; num=num/10; } cout <<inverse <<endl; return 0; }
11th Mar 2017, 4:05 PM
Bts...
Bts... - avatar
+ 1
# include <iostream> using namespace std; int main () { int num; int rem;//remain cout <<"enter number "; cin>>num; while (num!=0) { rem=num%10; cout <<rem; num =num/10; } return 0; } thanks my teachers 🙊🙈
13th Mar 2017, 4:07 PM
Bts...
Bts... - avatar