how to write optimum code to divide a 50 digit number with a
25 digit number??
Answer / Nidhi Rajput
In C, you can use long long integers to handle large numbers. Here's an example of how you can divide two large numbers:
```c
#include <stdio.h>
long long int div(long long int a, long long int b) {
long long int quotient = 0;
long long int temp = a;
while (temp >= b) {
temp -= b;
quotient++;
}
return quotient;
}
int main() {
long long int num1 = 123456789012345678901234567890;
long long int num2 = 12345678901234567;
printf("The quotient is: %lld", div(num1, num2));
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
write a program in c to find out the sum of digits of a number.but here is a condition that compiler sums the value from left to right....not right to left..
i=10,j=20 j=i,j?(i,j)?i:j:j print i,j
What are the rules for identifiers in c?
What is c programing language?
WAP to accept rollno,course name & marks of a student & display grade if total marks is above 200?
What language is c written?
write a program to display reverse of a number using for loop?
how does a general function , that accepts an array as a parameter, "knows" the size of the array ? How should it define it parameters list ?
explain what is fifo?
simple program of graphics and their output display
Why static variable is used in c?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above