My issue
What is error
My code
#include <stdio.h>
struct Rectangle {
int length;
int width;
};
int main() {
int t;
scanf("%d", &t);
for (int i = 0; i < t; i++) {
struct Rectangle rect;
scanf("%d %d", &rect.length, &rect.width);
int area = rect.length * rect.width;
int perimeter = 2 * (rect.length + rect.width);
printf("%d\n%d", area, perimeter);
}
return 0;
}
Learning course: Learn C Programming
Problem Link: https://www.codechef.com/learn/course/rcpit-programming-c/RCPITLPC33/problems/RCPITCP214