How to enter values in brackets and numbers with a degree in C console

57 views Asked by At

I have an array of unsigned long long int type, the values are entered in one line through the console, among the numbers there are (2^32-1)^2-1 and (2^32-1)^2+1.

How can I convert this to a natural number?

I tried to use:


scanf("%llu^%llu", &numbers[i], &degree[i]);
result[i] = pow(numbers[i], degree[i]);

but it only worked in a few cases

0

There are 0 answers