Write a C program to find the GCD of two numbers.
#include<stdio.h> #include<conio.h> main() { int a,b,r,t; printf("\n Enter two number"); scanf("%d %d",&a,&b); if(a<b) { t=a; a=b; b=t; } do { r=a%b; a=b; b=r; }while(r!=0); printf("\n The GCD=%d",a); getch(); }
Output:
What is Weak entity set? Explain with suitable example.
Discuss the ACID properties of transaction.
How insertion sort and selection sorts are different?