USER'S CHOICE POST

Internet Download Manager free download for life time activated
Top 10 software you must have in your computer/laptop/tab with free download link

Earn upto Rs. 9,000 pm checking Emails. Join now! And get Rs. 99 Instantly!

ALL THE INFORMATION GIVEN IN THIS SITE IS ONLY FOR THE LEARNING PURPOSE. WE SHOULD ALWAYS USE THE GENUINE SOFTWARE! USE OF ANY INFORMATION GIVEN HERE IS SOLELY USERS' RESPONSIBILITY!


Tuesday, 17 April 2012

GCD or HCF of two numbers:

Filled under: ,


GCD or HCF of two numbers:

#include<stdio.h>
#include<conio.h>
void main()
{
int dis,div,rem;
clrscr();
printf("Enter two numbers for finding GCD::");
scanf("%d %d",&dis,&div);
printf("The GCD of %d and %d is ",dis,div);
while(div%dis!=0)
{
rem=div%dis;
div=dis;
dis=rem;
}
printf("%d",dis);
getch();
}

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...


Try New Whatsapp+ latest for free with lots of new Emoticons :) , Latest Version
Download NOW