assignment help
Oct 5, 2013 at 4:24pm UTC
Finds all the occurrences of letter ‘a’ in the input array and replaces it with ‘o’.
is kay liya condition kiya ho gi......below is code in which this condition is to add
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
#include <iostream>
#include <conio.h>
#include <string>
#include <string.h>
using namespace std;
int main (void )
{
char a[265];
cout << "Enter input " <<endl;
cin.getline(a , 265 );
int c = strlen(a) - 1;
for (; c >= 0; c--)
{
cout << a[c] ;
}
int i;
for (i=0;i<=strlen(a);i++)
{
if (a[i]>=65 && a[i]<=90)
a[i]=a[i]+32;
}
cout<< endl << endl <<" output in lowercase = " << a << endl;
int j;
for (j=0;j<=strlen(a);j++)
{
if (a[j]>=97 && a[j]<=122)
a[j]=a[j]-32;
}
cout<<" output in uppercase =" << a <<endl;
getch();
return 0;
}
Oct 5, 2013 at 4:48pm UTC
plz replyyyyyy
Topic archived. No new replies allowed.