Help me in solving FIT problem

My issue

In this problem, I want the user to dynamically input the no of test cases, and the distance between the Chef’s home and office. However, I am not getting the chance to enter the no of test cases or the distance in each test case. How should I tackle this problem

My code


int main()
int t, d, D;

printf("Please enter the no. of test cases you dezire: ");
scanf("%d", &t);

for(int i=0; i<t; i++)
printf("Please enter the no of Kilometeres that the chef walks: ");
scanf("%d", &d);

D = 10*d;
printf("Every week, the Chef walks a total of = %d km", D);
return 0;

Learning course: Basic Math using C
Problem Link: CodeChef: Practical coding for everyone

i think this code will be helpful to you.
include <stdio.h>
int main(void) {
int t;
int i=0;
int n;
return 0;

like this you can take input as test case and also distance in each test case.