c语言用迭代法求最大公约数,用迭代法求两个数的最大公约数和最小公倍数

c语言论文

用迭代法求两个数的最大公约数和最小公倍数

化工09110605

摘要:迭代法是一种循环控制语句和循环结构程序的设计方法。在计算机解决问

题的时候,总希望从复杂的问题中找到规律,并归结为简单问题的重复,发挥其

擅长重复运算的特点,让它重复执行一组语句,直到满足给定条件为止。因此,

c语言提供了重复操作的语句,由这些语句构成的程序称为循环结构。本文就

是采用迭代法,利用c语言中提供的重复语句,求得两个数的最大公约数和最小

公倍数。

关键词:循环语句;循环结构;迭代法;最大公约数和最小公倍数

Iterative Method with the greatest common divisor and least

common multiple of two numbers

Chemical 09110605 WANG Meng

Abstract: The iterative method is a loop control statement and loop structure

design process. When the computer to solve the problem, hoping to find from the

law of complex issues and boil down to a simple repetition of questions, to play the

good characteristics of repeat operation, let it repeat a set of statements until the date that satisfies the given conditions. Therefore, c language repeat the statement

provided by these statements constitute the program is called loop structure. This

is the iterative method, using c language provided by the repeated statement,

obtained the greatest common divisor and least common multiple of two

numbers.

Key words: loop; loop structure; iteration; greatest common divisor and least common multiple

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值