How To Reverse A programme And Print Them Reverse And Actitual Value
For Example>
Input is 2
Output Is 21012
Or
Input Is 3
Output is 3210123
For Example>
Input is 2
Output Is 21012
Or
Input Is 3
Output is 3210123
See This Blue Color Source Code
#include<math.h>#include<conio.h>
class a
{
int a,b,c;
clrscr();
public:
void get();
void put();
};
void a::get()
{
cout<<"enter the value\n ";
cin>>a;
}
void a::put()
{
if(a!=0)
{
for(b=a;b>0;b--)
cout<<b;
for(b=0;b<a+1;b++)
cout<<b;
}
else
{
cout<<a;
}
}
main()
{
clrscr();
a x;
x.get();
x.put();
getch();
}
No comments:
Post a Comment