Computer Science, asked by devika83031, 5 months ago

The first line of input consits of numbers of test cases,T next T lines consist of three space separated integers x y and N each
Constraints
1<=T<=100

Answers

Answered by ss7787244
1

Explanation:

thanks for free points

Answered by Jasleen0599
0

C PROGRAM

#include <stdio.h>

int main()

{

   int kases;

   scanf("%d", &kases);

   int kase;

   for(kase = 1; kase <= kases; kase++) {

       int  N;

       scanf("%d", &N);

       int result[1000];

       result[0] = 1;

       int length = 1, i, j, temp, carry = 0;

       for(i = 2; i <= N; i++) {

           for(j = 0; j < length; j++) {

               temp = carry + result[j] * i;

               carry = temp / 10;

               result[j] = temp % 10;

           }

           while(carry) {

               result[j] = carry % 10;

               carry /= 10;

               j++;

           }

           length = j;

       }

       for(int i = length - 1; i >= 0; i--){

           printf("%d", result[i]);

       }

       printf("\n");

   }

   return 0;

}

#SPJ2

Similar questions