C++ GCF and LCM - repost

已关闭 已发布的 Jan 19, 2013 货到付款
已关闭

I can give you this porject now.

Program of LCM:

#include

#include

int lcm(int a, int b)

{

int r=1;

if( r % b == 0 && r % a == 0)

return r;

r++;

lcm(a,b);

}

void main()

{

clrscr();

int a , b,l;

cout<>a;

cout<>b;

if(a>b)

l = lcm(a,b);

else

l = lcm(b,a);

cout<<"\n\n\nResult:\t"<<l;

getch();

}

Program of GCD:

#include

#include

int simplify(int num, int denom)

{

int r=1 , tn=0 , td=0;

if(num<denom)

{

tn=denom;

td=num;

}

else

{

tn=num;

td=denom;

}

while(r!=0)

{

r=tn%td;

tn=td;

td=r;

}

return tn;

}

void main()

{

clrscr();

int num , denom , result;

cout<>num;

cout<>denom;

result = simplify(num , denom);

cout<<"\n\n\nResult:\t"<<result;

getch();

}

C++编程 工程 软件构架

项目ID: #4141832

关于项目

9个方案 远程项目 活跃的Feb 25, 2013

有9名威客正在参与此工作的竞标,均价$8/小时

vano101

Hello. What should be done this this short c program? Thanks.

$18 USD / 小时
(320条评论)
6.3
it2051229

Hi, what are we going to do with this program?

$8 USD / 小时
(79条评论)
5.3
wanly3643vw

I will send the fixed the code asap.

$8 USD / 小时
(26条评论)
3.7
narendragautam

Hi, I am interested. thanks Narendra

$8 USD / 小时
(3条评论)
3.6
hkarthikkumar

Hi Please check the private message for more details. Thanks.

$7 USD / 小时
(3条评论)
2.6
fjafri

Please provide me details of the task. Thanks

$3 USD / 小时
(0条评论)
0.0
ramanakypu

Being a c++ programmer for 4 years, I can deliver you the Quality output on time. I am sure I will meet your expectations

$8 USD / 小时
(0条评论)
0.0
mherasatryan

please write your problem very correctly.

$5 USD / 小时
(0条评论)
0.0
prashant170192

WHAT KIND OF WORK DO YOU REQUIRE. iT LOOKS REALLY EASY

$5 USD / 小时
(0条评论)
0.0