Code problem (whar is wrong in given code) my code is not running

package cruxonline;
import java.util.Scanner;
public class Hcf {

public static void main(String[] args) {
	// TODO Auto-generated method stub

	Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
	int b =  sc.nextInt();
	int c =0;
	while(c !=0)
	{
		c = a%b;
		a =b;
		b=c;
		
	}
	System.out.println(a);
	
	
}

}

@mayanktiwari6957 bro you are taking c = 0, then you are putting the condition in while loop c != 0, then how it is supposed to enter the loop because c is initialized to 0 by you.

@mayanktiwari6957 bro you are taking c = 0, then you are putting the condition in while loop c != 0, then how it is supposed to enter the loop because c is initialized to 0 by you.

ok broo… now I understand… thankss bro❤

@mayanktiwari6957 Bro if your doubt is cleared mark it resolved and rate full else lemme know your query!