Toggle navigation
About
Contact US
Jobs
Coding
Interview Questions
Submit
CseWay
A Way For Learning
Program to find the GCD of two numbers
No comments
/*Program to find the GCD of two numbers*/
public class Prgrm {
public static void main(String[] args) {
int a=33;
int b=22;
int temp;
while(b!=0){
temp=a;
a=b;
b=temp%b;
}
System.out.println("gcd of given numbers is " + a);
}
}
Newer Post
Older Post
No comments :
Post a Comment
Subscribe to:
Post Comments ( Atom )
Popular Posts
Translate
Contact Form
Name
Email
*
Message
*
No comments :
Post a Comment