C++ is a middle-level programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs. C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.
Wednesday, 6 April 2016
Write a program in c++ to print reverse no using do while loop.
//wap in c++ to print reverse no using do while loop.
Coding:-
#include<iostream.h> #include<conio.h> void main() { clrscr(); int a,digit; cout<<"enter any no to find its reverse no"; cin>>a; do { digit=a%10; cout<<digit; a=a/10; } while(a>0); getch(); }
No comments:
Post a Comment