Professional Documents
Culture Documents
#include<iostream.h>
Int a,b;
Int cmmdc(int a, int b)
{if(a==0) return b;
Else if(a<b)return cmmdc(a-b, b);
Else return cmmdc(a, b-a);
}
Int cmmmc (int a, int b)
{cmmmc=(a*b)/cmmdc(a, b);
}
Int main()
{int a,b;
Cout<<a=<<a;
Cout<<b=<<b;
Cout<<cmmmc pentru numerele<<a<<si<<b<<este<<cmmmc;
Return 0 ;
Numarul de cifre
#include<iostream.h>
{int n, k=o ;
While(n!=0)
X=n%10;
K++;
N=n/10;
Return k;}
Int main ()
{int n;
Cout<<n=<<n;
Cout<<Numarul<<n<<are<<k<<cifre;
Return 0;
}
Numar prim
#include<iostream.h>