writing a simple programming for counting

aliz_khanz's Avatar, Join Date: Apr 2011
Go4Expert Member
I have to write a program which prints the input lines which will skip the initial spaces and tabulator characters, as well as completely empty lines.
0
unni krishnan.r's Avatar, Join Date: Apr 2010
Skilled contributor
I didnt understant the question
one thing aliz_khanz,
in your program if you input "i hate $ Love stories"
it will output "ihatelovestories"
thats all i understant and ive done a programm 4 u
Code:
#include<iostream.h>
#include<conio.h>
void main()
{
int size;
char a[100];
cout<<"enter the size of string";
cin>>size;
cout<<"enter the sring"
cin.getline(a,size);
for(int i=0;a[i]!='\0';i++)
{ 
        if(a[i]>='a' && a[i]<='z')
        cout<<a[i];
         if(a[i]>='A' && a[i]<='Z')
        cout<<a[i];
}
}
0
aliz_khanz's Avatar, Join Date: Apr 2011
Go4Expert Member
Hey thanks man ! .....

actually what i understand is .......lets say you write i hate love stories and in the next line you write ranbir kapoor , the programme should show it in one line. i hope it helps !!!
0
aliz_khanz's Avatar, Join Date: Apr 2011
Go4Expert Member
I have tried the programme and it the built is failed