Search found 1 match

by adibbd
Mon May 04, 2009 8:07 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 85813

10038- i've WA!pls help me any1..the code is giving output..

#include <iostream> using namespace std; int abs(int x) { return x<0?(-x):x ; } int main () { int i,n,j,num,x; char jolly[3001],store[3000]; while(cin>>n) { for (i=0;i<n;i++) { cin>>num; jolly =num; } jolly =NULL; i=0,j=0; while(1) { x=jolly -jolly[i+1]; x=abs(x); store[j++]=x; i++; if (jolly[i+1]==...

Go to advanced search