Welcome![Sign In][Sign Up]
Location:
Downloads SourceCode Other assembly language
Title: 142 Download
 Description: #include<iostream> using namespace std int x(int a,int b) //x为求最大公约数的函数 { int t=0 if(a>b)t=b else t=a for(int i=t i>=1 i--)if(a i==0&&b i==0)break return i } int y(int a,int b) //y为求最小公倍数的函数 { int t=0 if(a>b)t=a else t=b for(int i=t i++)if(i a==0&&i b==0)break return i } void main() {int a,b,i,j cout<<"请输入两个整数"<<endl cin>>a>>b i=x(a,b) j=y(a,b) cout<<"两个整数的最大公约数为"<<i<<endl cout<<"两个整数的最小公倍数为"<<j<<endl }
 Downloaders recently: [More information of uploader ll]
 To Search:
File list (Check if you may need any files):
 

说明.txt
    

CodeBus www.codebus.net