herrDeng網內搜尋

自訂搜尋

Ads

2009年6月2日 星期二

CMD模式下執行C程式


CMD模式下執行C程式

61 則留言:

B9733176 提到...

C:\Documents and Settings\user\桌面>type 1.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int x,int y)
{
    int r=x%y;
    if(r==0)
        return y;
    else
        return gcd(y,r);
}
int main(int argc,char *argv[])
{
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>1 88 55
3
11

B9733165 提到...

C:\Documents and Settings\user\桌面>type 2.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int x,int y)
{
    int r=x%y;
    if (r==0)
        return y;
    else
        return gcd(y,r);
}
int main(int argc,char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("Pause");
    return 0;
}
C:\Documents and Settings\user\桌面>2 12 36
3
gcd=12

b9733129 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type work.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
        return y;
    else
        return gcd(y,r);
}
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>work 36 78
3
gcd=6

b9733140 提到...

C:\Documents and Settings\user\桌面>type 1.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int x,int y)
{
  int r=x%y;
  if(r==0)
      return y;
  else
      return gcd(y,r);
}
int main(int argc,char *argv[])
{
  int n=argc;
  printf("%d\n",n);
  int x=atoi(argv[1]);
  int y=atoi(argv[2]);
  printf("gcd=%d\n",gcd(x,y));
  system("pause");
  return 0;
}
C:\Documents and Settings\user\桌面>1 132 110
3
gcd=22
請按任意鍵繼續 . . .

B9733130 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type 123.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
        return y;
    else
        return gcd(y,r);
}
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>123 23 45
3
gcd=1
請按任意鍵繼續 . . .

b9733148 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type 123.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
    return y;
    else
    return gcd(y,r);
    }
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>123 12 34
3
gcd=2
請按任意鍵繼續 . . .

B9733146 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type 123.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
    return y;
    else
    return gcd(y,r);
    }
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>123 12 34
3
gcd=2
請按任意鍵繼續 . . .

B9733141 提到...

 
C:\Documents and Settings\user\桌面>type 123456.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int,int);
int main(int argc,char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi (argv[1]);
    int y=atoi (argv[2]);
    printf("%d\n",x+y);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
int gcd(int x,int y)
{
    int ans;
    if(x%y==0)
    {
      ans=y;
    }
    else
    {
     ans=gcd(y,x%y);
    }
    return ans;
}
C:\Documents and Settings\user\桌面>test 1234 1234
3
2468
請按任意鍵繼續 . . .
C:\Documents and Settings\user\桌面>123456 1234 1234
3
2468
gcd=1234
請按任意鍵繼續 . . .

B9733188 提到...


C:\Documents and Settings\user\桌面>type gcd.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int,int);
int main(int argc,char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi (argv[1]);
    int y=atoi (argv[2]);
    printf("%d\n",x+y);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
int gcd(int x,int y)
{
    int ans;
    if(x%y==0)
    {
      ans=y;
    }
    else
    {
     ans=gcd(y,x%y);
    }
    return ans;
}
C:\Documents and Settings\user\桌面>gcd 1234 1234
3
2468
gcd=1234
請按任意鍵繼續 . . .

B9733127 提到...


C:\Documents and Settings\user\桌面>type gcd.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int,int);
int main(int argc,char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi (argv[1]);
    int y=atoi (argv[2]);
    printf("%d\n",x+y);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
int gcd(int x,int y)
{
    int ans;
    if(x%y==0)
    {
      ans=y;
    }
    else
    {
     ans=gcd(y,x%y);
    }
    return ans;
}
C:\Documents and Settings\user\桌面>gcd 1234 1234
3
2468
gcd=1234
請按任意鍵繼續 . . .

B9733166 提到...


C:\Documents and Settings\user\桌面>type gcd.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int,int);
int main(int argc,char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi (argv[1]);
    int y=atoi (argv[2]);
    printf("%d\n",x+y);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
int gcd(int x,int y)
{
    int ans;
    if(x%y==0)
    {
      ans=y;
    }
    else
    {
     ans=gcd(y,x%y);
    }
    return ans;
}
C:\Documents and Settings\user\桌面>gcd 1234 1234
3
2468
gcd=1234
請按任意鍵繼續 . . .

B9733134 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>dir/w
 磁碟區 C 中的磁碟是 Win XP
 磁碟區序號:  F809-3433
 C:\Documents and Settings\user\桌面 的目錄
[.]                                [..]
Dev-C++.lnk                        ITE測驗系統-Client端程式.lnk
Makefile.win                       Microsoft Visual Studio 2008.lnk
PhotoImpact 10.lnk                 PowerCam5.lnk
SPSS 14.0 中文視窗版.lnk           SQL Server Management Studio.lnk
[src]                              test.cpp
test.dev                           test.exe
test.o                             TQC測驗系統-Client端程式.lnk
Wireshark.lnk                      WorkFlowERP 系統.lnk
網際網路.lnk
              16 個檔案         442,180 位元組
               3 個目錄   8,810,323,968 位元組可用
C:\Documents and Settings\user\桌面>type test.cpp
#include <cstdlib>
#include <iostream>
using namespace std;
int gcd(int,int);
int main(int argc, char *argv[])
{
    int m=atoi(argv[1]);
    int n=atoi(argv[2]);
    printf("gcd=%d\n",gcd(m,n));
    system("PAUSE");
    return EXIT_SUCCESS;
}
int gcd(int m,int n)
{
    int ans;
    if(m%n==0)
    {
       ans=n;
    }
    else
    {
        ans=gcd(n,m%n);
    }
    return ans;
}
C:\Documents and Settings\user\桌面>test 123 456
gcd=3

B9733135 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>dir/w
 磁碟區 C 中的磁碟是 Win XP
 磁碟區序號:  F809-3433
 C:\Documents and Settings\user\桌面 的目錄
[.]                                [..]
Dev-C++.lnk                        ITE測驗系統-Client端程式.lnk
Makefile.win                       Microsoft Visual Studio 2008.lnk
PhotoImpact 10.lnk                 PowerCam5.lnk
SPSS 14.0 中文視窗版.lnk           SQL Server Management Studio.lnk
[src]                              test.cpp
test.dev                           test.exe
test.o                             TQC測驗系統-Client端程式.lnk
Wireshark.lnk                      WorkFlowERP 系統.lnk
網際網路.lnk
              16 個檔案         442,180 位元組
               3 個目錄   8,808,656,896 位元組可用
C:\Documents and Settings\user\桌面>type test.cpp
#include <cstdlib>
#include <iostream>
using namespace std;
int gcd(int,int);
int main(int argc, char *argv[])
{
    int m=atoi(argv[1]);
    int n=atoi(argv[2]);
    printf("gcd=%d\n",gcd(m,n));
    system("PAUSE");
    return EXIT_SUCCESS;
}
int gcd(int m,int n)
{
    int ans;
    if(m%n==0)
    {
       ans=n;
    }
    else
    {
        ans=gcd(n,m%n);
    }
    return ans;
}
C:\Documents and Settings\user\桌面>test 125 15
gcd=5

b9733142 提到...

C:\Documents and Settings\user\桌面>type 1.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int x,int y)
{
  int r=x%y;
  if(r==0)
      return y;
  else
      return gcd(y,r);
}
int main(int argc,char *argv[])
{
  int n=argc;
  printf("%d\n",n);
  int x=atoi(argv[1]);
  int y=atoi(argv[2]);
  printf("gcd=%d\n",gcd(x,y));
  system("pause");
  return 0;
}
C:\Documents and Settings\user\桌面>1 2345 6789
3
gcd=1
請按任意鍵繼續 . . .

B9733137 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>dir/w
 磁碟區 C 中的磁碟是 Win XP
 磁碟區序號:  F809-3433
 C:\Documents and Settings\user\桌面 的目錄
[.]                                [..]
Dev-C++.lnk                        ITE測驗系統-Client端程式.lnk
Makefile.win                       Microsoft Visual Studio 2008.lnk
PhotoImpact 10.lnk                 PowerCam5.lnk
SPSS 14.0 中文視窗版.lnk           SQL Server Management Studio.lnk
[src]                              test.cpp
test.dev                           test.exe
test.o                             TQC測驗系統-Client端程式.lnk
Wireshark.lnk                      WorkFlowERP 系統.lnk
網際網路.lnk
              16 個檔案         442,180 位元組
               3 個目錄   8,808,529,920 位元組可用
C:\Documents and Settings\user\桌面>type test.cpp
#include <cstdlib>
#include <iostream>
using namespace std;
int gcd(int,int);
int main(int argc, char *argv[])
{
    int m=atoi(argv[1]);
    int n=atoi(argv[2]);
    printf("gcd=%d\n",gcd(m,n));
    system("PAUSE");
    return EXIT_SUCCESS;
}
int gcd(int m,int n)
{
    int ans;
    if(m%n==0)
    {
       ans=n;
    }
    else
    {
        ans=gcd(n,m%n);
    }
    return ans;
}
C:\Documents and Settings\user\桌面>test 9887 8654
gcd=1

b9733157 提到...

C:\Documents and Settings\user\桌面>type 1.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int x,int y)
{
  int r=x%y;
  if(r==0)
      return y;
  else
      return gcd(y,r);
}
int main(int argc,char *argv[])
{
  int n=argc;
  printf("%d\n",n);
  int x=atoi(argv[1]);
  int y=atoi(argv[2]);
  printf("gcd=%d\n",gcd(x,y));
  system("pause");
  return 0;
}
C:\Documents and Settings\user\桌面>1 2345 6789
3
gcd=1
請按任意鍵繼續 . . .

B9733184 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>dir/w
 磁碟區 C 中的磁碟是 Win XP
 磁碟區序號:  F809-3433
 C:\Documents and Settings\user\桌面 的目錄
[.]                                [..]
Dev-C++.lnk                        ITE測驗系統-Client端程式.lnk
Makefile.win                       Microsoft Visual Studio 2008.lnk
PhotoImpact 10.lnk                 PowerCam5.lnk
SPSS 14.0 中文視窗版.lnk           SQL Server Management Studio.lnk
[src]                              test.cpp
test.dev                           test.exe
test.o                             TQC測驗系統-Client端程式.lnk
Wireshark.lnk                      WorkFlowERP 系統.lnk
網際網路.lnk
              16 個檔案         442,180 位元組
               3 個目錄   8,808,529,920 位元組可用
C:\Documents and Settings\user\桌面>type test.cpp
#include <cstdlib>
#include <iostream>
using namespace std;
int gcd(int,int);
int main(int argc, char *argv[])
{
    int m=atoi(argv[1]);
    int n=atoi(argv[2]);
    printf("gcd=%d\n",gcd(m,n));
    system("PAUSE");
    return EXIT_SUCCESS;
}
int gcd(int m,int n)
{
    int ans;
    if(m%n==0)
    {
       ans=n;
    }
    else
    {
        ans=gcd(n,m%n);
    }
    return ans;
}
C:\Documents and Settings\user\桌面>test 9887 8654
gcd=1

b9733147 提到...

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type 123.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>123 1000 1004
3
gcd=4
請按任意鍵繼續 . . .

b9733132 提到...

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type 123.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>123 1000 1004
3
gcd=4
請按任意鍵繼續 . . .

b9733138 提到...

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type 123.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>123 1000 1004
3
gcd=4
請按任意鍵繼續 . . .

b9733149 提到...

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type 123.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>123 1000 1004
3
gcd=4
請按任意鍵繼續 . . .

b9733143 提到...

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type 123.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>123 1000 1004
3
gcd=4
請按任意鍵繼續 . . .

b9733128 提到...

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type 123.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>123 1000 1004
3
gcd=4
請按任意鍵繼續 . . .

B9733125 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>dir/w
 磁碟區 C 中的磁碟是 Win XP
 磁碟區序號:  F809-3433
 C:\Documents and Settings\user\桌面 的目錄
[.]                                [..]
Dev-C++.lnk                        ITE測驗系統-Client端程式.lnk
Makefile.win                       Microsoft Visual Studio 2008.lnk
PhotoImpact 10.lnk                 PowerCam5.lnk
SPSS 14.0 中文視窗版.lnk           SQL Server Management Studio.lnk
[src]                              test.cpp
test.dev                           test.exe
test.o                             TQC測驗系統-Client端程式.lnk
Wireshark.lnk                      WorkFlowERP 系統.lnk
網際網路.lnk
              16 個檔案         442,180 位元組
               3 個目錄   8,808,529,920 位元組可用
C:\Documents and Settings\user\桌面>type test.cpp
#include <cstdlib>
#include <iostream>
using namespace std;
int gcd(int,int);
int main(int argc, char *argv[])
{
    int m=atoi(argv[1]);
    int n=atoi(argv[2]);
    printf("gcd=%d\n",gcd(m,n));
    system("PAUSE");
    return EXIT_SUCCESS;
}
int gcd(int m,int n)
{
    int ans;
    if(m%n==0)
    {
       ans=n;
    }
    else
    {
        ans=gcd(n,m%n);
    }
    return ans;
}
C:\Documents and Settings\user\桌面>test 9887 8654
gcd=1

b9733159 提到...

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type 123.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>123 1000 1004
3
gcd=4
請按任意鍵繼續 . . .

b9733179 提到...

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type 123.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>123 1000 1004
3
gcd=4
請按任意鍵繼續 . . .

b9733172 提到...

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type 123.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>123 1000 1004
3
gcd=4
請按任意鍵繼續 . . .

b9733162 提到...

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type 123.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>123 1000 1004
3
gcd=4
請按任意鍵繼續 . . .

b9733183 提到...

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type 123.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>123 1000 1004
3
gcd=4
請按任意鍵繼續 . . .

B9733133 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>dir/w
 磁碟區 C 中的磁碟是 Win XP
 磁碟區序號:  F809-3433
C:\Documents and Settings\user\桌面 的目錄
[.]                                [..]
Dev-C++.lnk                        ITE測驗系統-Client端程式.lnk
Makefile.win                       Microsoft Visual Studio 2008.lnk
PhotoImpact 10.lnk                 PowerCam5.lnk
SPSS 14.0 中文視窗版.lnk           SQL Server Management Studio.lnk
[src]                              test.cpp
test.dev                           test.exe
test.o                             test.sln
TQC測驗系統-Client端程式.lnk       Wireshark.lnk
WorkFlowERP 系統.lnk               網際網路.lnk
              17 個檔案         442,380 位元組
               3 個目錄   8,808,882,176 位元組可用
C:\Documents and Settings\user\桌面>type test.cpp
#include <cstdlib>
#include <iostream>
using namespace std;
int gcd(int,int);
int main(int argc, char *argv[])
{
    int m=atoi(argv[1]);
    int n=atoi(argv[2]);
    printf("gcd=%d\n",gcd(m,n));
    system("PAUSE");
    return EXIT_SUCCESS;
}
int gcd(int m,int n)
{
    int ans;
    if(m%n==0)
    {
        ans=n;
    }
    else
    {
        ans=gcd(n,m%n);
    }
    return ans;
}
C:\Documents and Settings\user\桌面>test 10 20
gcd=10
請按任意鍵繼續 . . .

b9733152 提到...

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type 123.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>123 1000 1004
3
gcd=4
請按任意鍵繼續 . . .

B9733175 提到...

#include <cstdlib>
#include <iostream>
using namespace std;
int gcd(int,int);
int main(int argc, char *argv[])
{
    int m=atoi(argv[1]);
    int n=atoi(argv[2]);
    printf("gcd=%d\n",gcd(m,n));
    system("PAUSE");
    return EXIT_SUCCESS;
}
int gcd(int m,int n)
{
    int ans;
    if(m%n==0)
    {
       ans=n;
    }
    else
    {
        ans=gcd(n,m%n);
    }
    return ans;
}

B9733174 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type 新文件1.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
      return y;
    else
      return gcd(y,r);
}
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>新文件1 123 456
3
gcd=3
請按任意鍵繼續 . . .

B9733131 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>dir/w
 磁碟區 C 中的磁碟是 Win XP
 磁碟區序號:  F809-3433
C:\Documents and Settings\user\桌面 的目錄
[.]                                [..]
Dev-C++.lnk                        ITE測驗系統-Client端程式.lnk
Makefile.win                       Microsoft Visual Studio 2008.lnk
PhotoImpact 10.lnk                 PowerCam5.lnk
SPSS 14.0 中文視窗版.lnk           SQL Server Management Studio.lnk
[src]                              test.cpp
test.dev                           test.exe
test.o                             test.sln
TQC測驗系統-Client端程式.lnk       Wireshark.lnk
WorkFlowERP 系統.lnk               網際網路.lnk
              17 個檔案         442,380 位元組
               3 個目錄   8,808,882,176 位元組可用
C:\Documents and Settings\user\桌面>type test.cpp
#include <cstdlib>
#include <iostream>
using namespace std;
int gcd(int,int);
int main(int argc, char *argv[])
{
    int m=atoi(argv[1]);
    int n=atoi(argv[2]);
    printf("gcd=%d\n",gcd(m,n));
    system("PAUSE");
    return EXIT_SUCCESS;
}
int gcd(int m,int n)
{
    int ans;
    if(m%n==0)
    {
        ans=n;
    }
    else
    {
        ans=gcd(n,m%n);
    }
    return ans;
}
C:\Documents and Settings\user\桌面>test 123 456
gcd=3
請按任意鍵繼續 . . .

B9733181 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type 測試.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
      return y;
    else
      return gcd(y,r);
}
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>測試 123 456
3
gcd=3
請按任意鍵繼續 . . .

b9733124 提到...

#include <cstdlib>
#include <iostream>
using namespace std;
int gcd(int,int);
int main(int argc, char *argv[])
{
     int m=atoi(argv[1]);
     int n=atoi(argv[2]);
    printf ("gcd=%d\n",gcd(m,n));
    system ("pause");
    return EXIT_SUCCESS;
    }
    int gcd(int m,int n)
    {
        int ans;
        if(m%n==0)
        {
                  ans=n;
                  }
                  else
        {
        ans=gcd(n,m%n);
        }
        return ans;
        }

B9733136 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type test.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
      return y;
    else
      return gcd(y,r);
}
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>test 123 456
3
gcd=3
請按任意鍵繼續 . . .

B9733139 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type 123.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
      return y;
    else
      return gcd(y,r);
}
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>123 123 456
3
gcd=3
請按任意鍵繼續 . . .

B9733144 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type 新文件1.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
      return y;
    else
      return gcd(y,r);
}
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>新文件1 123 456
3
gcd=3
請按任意鍵繼續 . . .

B9733144 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type 新文件1.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
      return y;
    else
      return gcd(y,r);
}
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>新文件1 123 456
3
gcd=3
請按任意鍵繼續 . . .

B9733145 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type 新文件2.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
      return y;
    else
      return gcd(y,r);
}
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>新文件2 123 456
3
gcd=3
請按任意鍵繼續 . . .

B9733145 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type 新文件2.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
      return y;
    else
      return gcd(y,r);
}
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>新文件2 123 456
3
gcd=3
請按任意鍵繼續 . . .

b9733123 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\user>dir/w
磁碟區 C 中的磁碟是 Win XP
磁碟區序號: F809-3433

C:\Documents and Settings\user 的目錄

[.] [..] [Favorites] [My Documents]
[WINDOWS] [「開始」功能表] [桌面]
0 個檔案 0 位元組
7 個目錄 8,907,120,640 位元組可用

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type test.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>test 1234 1238
3
gcd=2
請按任意鍵繼續 . . .

C:\Documents and Settings\user\桌面>

b9533182 提到...

#include <stdio.h>
#include <stdlib.h>
int gcd(int x,int y)
{
int ans;
if(x%y==0)
{
ans=y;
}
else
{
ans=gcd(y,x%y);
}
return ans;
}
int main(int arge,char *argv[]){
int n=arge;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("%d\n",x+y);
printf ("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}

C:\Documents and Settings\user\桌面>type main.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int x,int y)
{
int ans;
if(x%y==0)
{
ans=y;
}
else
{
ans=gcd(y,x%y);
}
return ans;
}
int main(int arge,char *argv[]){
int n=arge;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("%d\n",x+y);
printf ("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}

C:\Documents and Settings\user\桌面>專案1 987654321 123456789
3
1111111110
gcd=9
請按任意鍵繼續 . . .

b9733150 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\user>dir/w
磁碟區 C 中的磁碟是 Win XP
磁碟區序號: F809-3433

C:\Documents and Settings\user 的目錄

[.] [..] [Favorites] [My Documents]
[WINDOWS] [「開始」功能表] [桌面]
0 個檔案 0 位元組
7 個目錄 8,907,120,640 位元組可用

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type test.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>test 1234 1238
3
gcd=2
請按任意鍵繼續 . . .

C:\Documents and Settings\user\桌面>

B9733161 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type 新文件1.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
      return y;
    else
      return gcd(y,r);
}
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>新文件1 123 456
3
gcd=3
請按任意鍵繼續 . . .

B9733126 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type 新文件1.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
      return y;
    else
      return gcd(y,r);
}
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>新文件1 123 456
3
gcd=3
請按任意鍵繼續 . . .

b9733173 提到...

C:\Documents and Settings\user>dir/w
磁碟區 C 中的磁碟是 Win XP
磁碟區序號: F809-3433

C:\Documents and Settings\user 的目錄

[.] [..] [Favorites] [My Documents]
[WINDOWS] [「開始」功能表] [桌面]
0 個檔案 0 位元組
7 個目錄 8,905,940,992 位元組可用

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type test.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>test 1235 1236
3
gcd=1
請按任意鍵繼續 . . .

B9733170 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type 新文件1.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
      return y;
    else
      return gcd(y,r);
}
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>新文件1 123 456
3
gcd=3
請按任意鍵繼續 . . .

b9733163 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\user>dir/w
磁碟區 C 中的磁碟是 Win XP
磁碟區序號: F809-3433

C:\Documents and Settings\user 的目錄

[.] [..] [Favorites] [My Documents]
[WINDOWS] [「開始」功能表] [桌面]
0 個檔案 0 位元組
7 個目錄 8,813,068,288 位元組可用

C:\Documents and Settings\user>cd 桌面

C:\Documents and Settings\user\桌面>type test.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>test 120 110
3
gcd=10
請按任意鍵繼續 . . .

b9733161 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type 新文件1.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
      return y;
    else
      return gcd(y,r);
}
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>新文件1 123 456
3
gcd=3
請按任意鍵繼續 . . .

B9733168 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type 新文件1.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x, int y)
{
    int r=x%y;
    if (r==0)
      return y;
    else
      return gcd(y,r);
}
int main(int argc, char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("pause");
    return 0;
}
C:\Documents and Settings\user\桌面>新文件1 123 456
3
gcd=3
請按任意鍵繼續 . . .

b9733182 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>dir/w
 磁碟區 C 中的磁碟是 Win XP
 磁碟區序號:  F809-3433
C:\Documents and Settings\user\桌面 的目錄
[.]                                [..]
Dev-C++.lnk                        ITE測驗系統-Client端程式.lnk
Makefile.win                       Microsoft Visual Studio 2008.lnk
PhotoImpact 10.lnk                 PowerCam5.lnk
SPSS 14.0 中文視窗版.lnk           SQL Server Management Studio.lnk
[src]                              test.cpp
test.dev                           test.exe
test.o                             test.sln
TQC測驗系統-Client端程式.lnk       Wireshark.lnk
WorkFlowERP 系統.lnk               網際網路.lnk
              17 個檔案         442,380 位元組
               3 個目錄   8,808,882,176 位元組可用
C:\Documents and Settings\user\桌面>type test.cpp
#include <cstdlib>
#include <iostream>
using namespace std;
int gcd(int,int);
int main(int argc, char *argv[])
{
    int m=atoi(argv[1]);
    int n=atoi(argv[2]);
    printf("gcd=%d\n",gcd(m,n));
    system("PAUSE");
    return EXIT_SUCCESS;
}
int gcd(int m,int n)
{
    int ans;
    if(m%n==0)
    {
        ans=n;
    }
    else
    {
        ans=gcd(n,m%n);
    }
    return ans;
}
C:\Documents and Settings\user\桌面>test 123 456
gcd=3
請按任意鍵繼續 . . .

B9633173 提到...

C:\Documents and Settings\user>dir/w
磁碟區 C 中的磁碟是 Win XP
磁碟區序號: F809-3433
C:\Documents and Settings\user 的目錄
[.] [..] [Favorites] [My Documents]
[WINDOWS] [「開始」功能表] [桌面]
0 個檔案 0 位元組
7 個目錄 8,905,940,992 位元組可用
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type test.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>test 1235 1236
3
gcd=1
請按任意鍵繼續 . . .

B9633174 提到...

C:\Documents and Settings\user>dir/w
磁碟區 C 中的磁碟是 Win XP
磁碟區序號: F809-3433
C:\Documents and Settings\user 的目錄
[.] [..] [Favorites] [My Documents]
[WINDOWS] [「開始」功能表] [桌面]
0 個檔案 0 位元組
7 個目錄 8,905,940,992 位元組可用
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type test.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>test 1235 1236
3
gcd=1
請按任意鍵繼續 . . .

B9633156 提到...

C:\Documents and Settings\user>dir/w
磁碟區 C 中的磁碟是 Win XP
磁碟區序號: F809-3433
C:\Documents and Settings\user 的目錄
[.] [..] [Favorites] [My Documents]
[WINDOWS] [「開始」功能表] [桌面]
0 個檔案 0 位元組
7 個目錄 8,905,940,992 位元組可用
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type test.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>test 1235 1236
3
gcd=1
請按任意鍵繼續 . . .

B9633139 提到...

C:\Documents and Settings\user>dir/w
磁碟區 C 中的磁碟是 Win XP
磁碟區序號: F809-3433
C:\Documents and Settings\user 的目錄
[.] [..] [Favorites] [My Documents]
[WINDOWS] [「開始」功能表] [桌面]
0 個檔案 0 位元組
7 個目錄 8,905,940,992 位元組可用
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>type test.cpp
#include<stdio.h>
#include<stdlib.h>
int gcd(int x,int y)
{
int r=x%y;
if(r==0)
return y;
else
return gcd(y,r);
}
int main(int argc,char*argv[])
{
int n=argc;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}
C:\Documents and Settings\user\桌面>test 1235 1236
3
gcd=1
請按任意鍵繼續 . . .

b9533185 提到...

#include <stdio.h>
#include <stdlib.h>
int gcd(int x,int y)
{
int ans;
if(x%y==0)
{
ans=y;
}
else
{
ans=gcd(y,x%y);
}
return ans;
}
int main(int arge,char *argv[]){
int n=arge;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("%d\n",x+y);
printf ("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}

C:\Documents and Settings\user\桌面>type main.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int x,int y)
{
int ans;
if(x%y==0)
{
ans=y;
}
else
{
ans=gcd(y,x%y);
}
return ans;
}
int main(int arge,char *argv[]){
int n=arge;
printf("%d\n",n);
int x=atoi(argv[1]);
int y=atoi(argv[2]);
printf("%d\n",x+y);
printf ("gcd=%d\n",gcd(x,y));
system("pause");
return 0;
}

C:\Documents and Settings\user\桌面>專案1 987654321 123456789
3
1111111110
gcd=9
請按任意鍵繼續 . . .

b9433003 提到...

C:\Documents and Settings\user\桌面>type 2.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int x,int y)
{
    int r=x%y;
    if (r==0)
        return y;
    else
        return gcd(y,r);
}
int main(int argc,char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("Pause");
    return 0;
}
C:\Documents and Settings\user\桌面>2 12 36
3
gcd=12

b9733153 提到...

C:\Documents and Settings\user\桌面>type 2.cpp
#include <stdio.h>
#include <stdlib.h>
int gcd(int x,int y)
{
    int r=x%y;
    if (r==0)
        return y;
    else
        return gcd(y,r);
}
int main(int argc,char *argv[]){
    int n=argc;
    printf("%d\n",n);
    int x=atoi(argv[1]);
    int y=atoi(argv[2]);
    printf("gcd=%d\n",gcd(x,y));
    system("Pause");
    return 0;
}
C:\Documents and Settings\user\桌面>2 12 36
3
gcd=12

B9733182 提到...

Microsoft Windows XP [版本 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>cd 桌面
C:\Documents and Settings\user\桌面>dir/w
磁碟區 C 中的磁碟是 Win XP
磁碟區序號: F809-3433
C:\Documents and Settings\user\桌面 的目錄
[.] [..]
Dev-C++.lnk ITE測驗系統-Client端程式.lnk
Makefile.win Microsoft Visual Studio 2008.lnk
PhotoImpact 10.lnk PowerCam5.lnk
SPSS 14.0 中文視窗版.lnk SQL Server Management Studio.lnk
[src] test.cpp
test.dev test.exe
test.o test.sln
TQC測驗系統-Client端程式.lnk Wireshark.lnk
WorkFlowERP 系統.lnk 網際網路.lnk
17 個檔案 442,380 位元組
3 個目錄 8,808,882,176 位元組可用
C:\Documents and Settings\user\桌面>type test.cpp
#include <cstdlib>
#include <iostream>
using namespace std;
int gcd(int,int);
int main(int argc, char *argv[])
{
int m=atoi(argv[1]);
int n=atoi(argv[2]);
printf("gcd=%d\n",gcd(m,n));
system("PAUSE");
return EXIT_SUCCESS;
}
int gcd(int m,int n)
{
int ans;
if(m%n==0)
{
ans=n;
}
else
{
ans=gcd(n,m%n);
}
return ans;
}
C:\Documents and Settings\user\桌面>test 123 456
gcd=3
請按任意鍵繼續 . . .

Related Posts Plugin for WordPress, Blogger...

熱門文章