0

i am getting time limit exceeded even if i dont use cin & cout.Plz help me

22nd Jun 2017, 6:19 AM
Karan Makwana
Karan Makwana - avatar
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
22nd Jun 2017, 6:39 AM
jay
jay - avatar
+ 2
which code?
22nd Jun 2017, 6:24 AM
jay
jay - avatar
+ 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; }
22nd Jun 2017, 6:36 AM
Karan Makwana
Karan Makwana - avatar
+ 1
thanks jay
22nd Jun 2017, 6:40 AM
Karan Makwana
Karan Makwana - avatar