Help me in solving BIRYANI problem

My issue

include <stdio.h>

struct classes {
int x, y, t, cl1;
};

int main() {
struct classes class;
scanf(“%d”, &class.t);
while (class.t–) {
class.cl1 = 0;
class.cl1 += class.x * class.y;
printf(“%d\n”, class.cl1);
}
return 0;
}
output coming wrong

My code

#include <stdio.h>

struct classes {
  int x, y, t, cl1;
};

int main() {
  struct classes class;
  scanf("%d", &class.t);
  while (class.t--) {
    class.cl1 = 0;
    class.cl1 += class.x * class.y;
    printf("%d\n", class.cl1);
  }
  return 0;
}

Problem Link: BIRYANI Problem - CodeChef

@gabajiya456
There is slight modification change the object name of the structure since ‘class’ is a keyword and you have forgotten to take in the values of x and y

use this

scanf(“%d %d”,&clas.x,&clas.y);
clas.cl1 = clas.x * clas.y; //do not use the + sign