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:
Write a C program to find both the largest and smallest number in list of integers.
Briefly discuss about Critical Path Method (CPM)
What is “Top-Down and Bottom-Up Design” approach?
Write an program to generate Pascal’s triangle.
Implement Bubble Sort using C.