write about the greatest common divisor using c language. How can I put a "please entre positive number" statement when I typing a negative or float number in this code?
# include <stdio.h>
int GCD (int a, int b) {
while ( b != 0 ) {
if ( a > b ) {
a = a – b ;
} else {
b = b – a ;
} return a;
}
int main (void) {
int a, b, result ;
printf(“Type two positive integers”);
scanf( %d %d, &a, &b);
result = GCD ( a, b) ;
printf(“GCD (%d, %d) = %d \n” , a , b, result );
return 0;
}