write a c-program to find gcd using recursive functions
Answer Posted / pavan_mustyala
int gcdRecurse(int a, int b)
{
int temp;
// error handling to prevent divide by zero
if(!b)
{
return b;
}
temp = a % b;
if (temp == 0)
{
return(b);
}
else
{
return(gcdRecurse(b, temp));
}
}
| Is This Answer Correct ? | 30 Yes | 11 No |
Post New Answer View All Answers
write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30
What is full form of PEPSI
why nlogn is the lower limit of any sort algorithm?
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']
#include
How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?
could you please send the program code for multiplying sparse matrix in c????
Write a program to model an exploding firecracker in the xy plane using a particle system
Develop a routine to reflect an object about an arbitrarily selected plane
Design an implement of the inputs functions for event mode
What is data _null_? ,Explain with code when u need to use it in data step programming ?
How can you relate the function with the structure? Explain with an appropriate example.
write a program for area of circumference of shapes
how to test pierrot divisor
why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?