BETA

Fresher

Submission : 94 Views : 1702

Divisible by 3

For the following C program find the value of "d" ?

int d=0;

for(int i=0;i<31;i++)

for(int j=0;j<31;j++)

for(int k=0;k<31;k++) {

              if (((i+j+k) % 3)==0)

              d=d+1;

              }

Login to Post Answer
Sort By:
Oldest
|
Newest
|
Vote
|
My Answer