#include <iostream>
#include <conio>
void main()
{
char arr[5];
cout<<"Enter charaterters\n";
for(int i=0;i<5;i++)
{
cin>>arr[i];
}
cout<<"Reverse order is\n";
for(int i=5;i>=0;i--)
{
cout<<arr[i]<<" ";
}
getch();
}
#include <conio>
void main()
{
char arr[5];
cout<<"Enter charaterters\n";
for(int i=0;i<5;i++)
{
cin>>arr[i];
}
cout<<"Reverse order is\n";
for(int i=5;i>=0;i--)
{
cout<<arr[i]<<" ";
}
getch();
}
0 comments:
Post a Comment