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