0
When i run a program output shows "time limit exceeded" . What should I do?
3 Respostas
+ 1
If you want to run it properly in sololearn playground, remove getch()
0
It means that code is to be solved in much easier and shorter way. The compiler is programmed for that shorter code to be compiled, and as your code is taking long to compile and execute longer than time to be consumed, it is showing that alert.
0
You can do it like this..
Or u can make it more efficient by printing all in one printf function.But thats not a good practise..
#include <stdio.h>
int main(){
int a,b,answer;
scanf("%d %d",&a,&b);
printf("sum of %d + %d = %d\n",a,b,a+b);
printf("sum of %d - %d = %d\n",a,b,a-b);
printf("sum of %d * %d = %d\n",a,b,a*b);
printf("sum of %d / %d = %d\n",a,b,a/b);
return 0;
}