Solved What could be the possible reason for this error ?

October 12, 2016 at 06:34:39
Specs: Windows 8.1
I have no idea why following snippet of code doesn't work on dev c++ 5.11.
Instead of showing ouptut ,it prompts me to enter input.I am including here the whole code so that you can help me more precisely.
Any help would be appreciated.

typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
#include<cstdlib> //for qsort
#define rep(x,a,b) for(x=a;i<b;x++)
#define scani(x) scanf("%d",&x)
#define scanfl(x) scanf("%f",&x)
#define scanc(x) scanf("%c",&x)
#define scand(x) scanf("%lf",&x)
#define scanll(x) scanf("%lli",&x)
#define scanl(x) scanf("%ld",&x)
#define scans(x) scanf("%s",x)
#define printi(x) printf("%d\n",x)
#define printl(x) printf("%ld\n",x)
#define printll(x) printf("%lli\n",x)
#define printd(x) printf("%lf\n",x)
#define printfl(x) printf("%f\n",x)
#define printc(x) printf("%c\n",x)
#define prints(x) printf("%s\n",x);
#define sloop(x) loop(i,0,strlen(x)-1)
#define whole(x) x.begin(),x.end()
#define pb push_back
#define newline cout<<"\n"
inline bool inc_range(int x,int y,int z) { return ((x>=y)&&(x<=z)); }
inline bool ex_range(int x,int y,int z) { return ((x>y)&&(x<z)); }
inline bool is_either(int x,int y,int z) { return ((x==y)||(x==z)); }
#define SIZE
#define MOD
#define debug
using namespace std;

template<typename type=int> void get_arr(type a[],type n) {for(type i=0;i<n;i++) cin>>a[i];}
template<typename type=int> void show_arr(type a[],type n=1) {for(type i=0;i<n;i++) cout<<a[i]<<" ";}

template<typename type=int>
inline type tmax(type a,type b,type c)
return max(max(a,b),c);

int main()

expected output: 9
behavior: (ASK FOR INPUT)

message edited by aditya0022

See More: What could be the possible reason for this error ?

Report •

October 12, 2016 at 08:34:14
✔ Best Answer
I tested your program using gcc. The output was

pi@raspberrypi:~ $ ./test
9pi@raspberrypi:~ $

as it should be. I can't comment on devc.

Report •

October 12, 2016 at 09:09:12
thanks.I too have tested it on codeblocks .It worked well there.

Report •
Related Solutions

Ask Question