0
i am getting time limit exceeded even if i dont use cin & cout.Plz help me
4 Answers
+ 3
well first thing I see without looking at anything else.. conio.h is not supported here.. also _getch would hold the program open. i will have a proper look when i get to my pc
+ 2
which code?
+ 1
#include<iostream>
#include<string>
#include<stdio.h>
#include<conio.h>
using namespace std;
int main()
{
char a[100];
int l=0,i;
gets(a);
for(i=0;a[i]!=NULL;i++)
{
if(a[i]=='A'&&a[i]=='Z')
{
a[l]=a[l]+32;
}
else if(a[i]=='a'&&a[i]=='z')
{
a[l]=a[l]-32;
}
}
printf("%s",a);
_getch();
return 0;
}
+ 1
thanks jay