• Loading...


0-14:0-41
Compilation Error
0

View Plain Text

  1. #include<stdio.h>
  2. main()
  3. {
  4.       int i,j,k,a=0,b,n=5040,sum;
  5.      
  6.       for(i=0;i<n;i++)
  7.       {
  8.                      
  9.                        
  10.                        
  11.                         for(sum=0,j=i;j<n;j++)
  12.                         {
  13.                                         sum+=j;
  14.                                         if(sum==n)
  15.                                         {
  16.                                         a=a+1;
  17.                                         break;
  18.                                         }
  19.                                        
  20.                                        
  21.                         }
  22.                                        
  23.                                        
  24.      
  25.       }
  26. printf("%d ",a);
  27. getch();
  28. }
  29.  



Trial 1
Trial 2
Trial 3
Trial 4
Submissions
Multipurpose
1000 pt
You are not logged in
0 / 170

Datatype
1000 pt
You are not logged in
0 / 308

No Bitwise
1000 pt
You are not logged in
0 / 78

Cuboid
1000 pt
You are not logged in
0 / 166

Evaluate the function
1000 pt
You are not logged in
0 / 94

Largest in the set
1000 pt
You are not logged in
0 / 69

2 to N
1000 pt
You are not logged in
0 / 144