New Member FAQ | Forums | Earn Revenue


Resources Entrance Ask Experts Exam Papers Jobs English Projects Universities Colleges Courses Schools Training My India



My Profile
Active Members
TodayLast 7 Days more...



Awards & Gifts
Online Exams

Fresher Jobs


Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi

Resources


Find educational articles, blogs, discussion threads and other resources.

Colleges


Find details about any college in India or search for courses.

website counter



Greatest Common Divisor in C


Posted Date:     Total Responses: 0    Posted By: Saheli   Member Level: Gold   Points/Cash: 3   


#include
#include

void gcd(int,int);
void main()
{
int a,b,t;
clrscr();
printf("\nEnter two numbers : ");
scanf("%d%d",&a,&b);
if(a {
t=a;
a=b;
b=t;
}
gcd(a,b);
}
void gcd(int a,int b)
{
int c;
c=a%b;
if(c!=0)
gcd(b,c);
else
{
printf("\nThe gcd = %d",b);
getch();
}
}

Attachments

  • H.C.F (2156-121154-GCD.C)

  • Project Feedbacks


    No feedbacks found. Be the first to respond and make money from revenue sharing program.

    Post Feedback
    You must Sign In to post a feedback.
    Next Project: Insertion Sort in C
    Previous Project: Factorial of a no. in C

    Return to Project Index

    Post New Project


    Related Projects






    Contact Us   Advertise   Editors    Privacy Policy    Terms Of Use   

    AdSense Revenue Sharing sites

    ISC Technologies.
    2006 - 2009 All Rights Reserved.