Code for Method of Handling Factorials of Any Size?
No Answer is Posted For this Question
Be the First to Post Answer
create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file
Here's the programm code: int magic(int a, int b) { return b == 0 ? a : magic(b, a % b); } int main() { int a, b; scanf("%d%d", &a, &b); printf("%d\n", magic(a, b)); return 0; } on input stream we have integers 4, 45 What's the output integer? How many times will be initiated "magic" function?
Show by induction that 2n > n2, for all n > 4.
2 Answers Karvy, Qatar University,
Find the maximum product of three numbers in an array? Eg. 9,5,1,2,3 Max product= 9*5*3= 135 The array can hav negative numbers also..
write a program that reverses the input number of n.Formulate an equation to come up with the answer.
Write a simple encryption program using string function which apply the substitution method.
How can I Draw an ellipse in 3d space and color it by using graph3d?
A research student is given a singly-linked list. Each node of the list has a color, which is either “Black” or “White”. He must find if there are more black nodes than white nodes, or vice versa. His advisor gives him 5,000Rs to buy a computer to do the work. He goes to the computer store and finds a slightly defective computer which costs a mere 3,000Rs. This computer has the small problem of not being able to do arithmetic. This means that he cannot use a counter to count the nodes in the list to determine the majority color. The computer is otherwise fully functional. He has the evil idea that he could buy the defective computer and somehow use it to do his work, so that he can use the rest of the money on enjoyment. Show how he can accomplish this amazing task. Write code for an algorithm called ‘findMajorityColor’ which takes a singly-linked list, L, with n nodes and returns the majority color among nodes of L. This algorithm should have the same asymptotic running time as counting the nodes (O(n)). Note: No arithmetic is allowed.
write a program that accepts a number and outputs its equivalent in words. take note that the maximum input is 3000
Given 1 to n random number, find top 10 maximum numbers and explain the time complexity of the algorithm.
program to find the magic square using array
write a program to perform generic sort in arrays?