#include<iostream.h>
void main()
{
int a,b,r;
cout<<"a=";cin>>a;
cout<<"b=";cin>>b;
while (r!=0)
{
r=a%b;
a=b;
b=r;}
cout<<"cmmdc="<<a;
pty commented: Try reading your error messages -2
Re: Please help me make this program work, can't find the problem 80 80

woaw, how could i not think about that? thanks sherlock!

Re: Please help me make this program work, can't find the problem 80 80

You're welcome, glad I could be of service.

commented: Fresh eyes, old professor. +12
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.