Article View: fj.lang.c
Article #383Re: 実行できません。
From: Masahiro Kondo
Date: Fri, 24 Apr 1998 00:00
Date: Fri, 24 Apr 1998 00:00
69 lines
2056 bytes
2056 bytes
こんにちは、近藤です。
Shadow wrote:
>
>
> #include<stdio.h>
>
> int add(int,int);
>
> main(void)
> {
> int a,b,ans;
>
> print�i”整数a,bの入力”);
> scanf(”%d%d”,&a,&b);
> ans=add(a,b);
> printf(”%d+%d=%d¥n”,a,b,ans);
> return(0);
> }
>
> int add(int a,int b)
> {
> return(a+b);
> }
>
--
全角文字のソースを、投稿しないほうがいいですよ (^^;
ちなみに、こちら(GNU Win32)での実行結果ですが・・
(全角から半角に変換をかけてコンパイル)
--------->
~/test > cat tst.c
#include<stdio.h>
int add(int,int);
main(void)
{
int a,b,ans;
printf("整数a,bの入力");
scanf("%d%d",&a,&b);
ans=add(a,b);
printf("%d+%d=%d\n",a,b,ans);
return(0);
}
int add(int a,int b)
{
return(a+b);
}
~/test > gcc -o tst tst.c
~/test > ls
tst.c tst.exe
~/test > tst
整数a,bの入力1 2
1+2=3
~/test >
<----------
こうなりました。
/*******************************************
Masahiro Kondo (Tokyo Japn)
mako@mail.raidway.ne.jp
*******************************************/
Technical Details
Message-ID:
<3540119B.7C03677D@mail.raidway.ne.jp>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<01bd6bab$40f32c60$8b128ccb@halfcustom.highway.or.jp>Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS X-Google-Thread: 106434,98bf0599dec7e738 X-Google-Attributes: gid106434,public From: Masahiro Kondo <mako@mail.raidway.ne.jp> Subject: Re: 実行できません。 Date: 1998/04/24 Message-ID: <3540119B.7C03677D@mail.raidway.ne.jp> X-Deja-AN: 347201341 Content-Transfer-Encoding: 7bit References: <01bd6bab$40f32c60$8b128ccb@halfcustom.highway.or.jp> Mime-Version: 1.0 X-Forwarded: by - (DeleGate/4.0.7) Content-Type: text/plain; charset=iso-2022-jp Newsgroups: fj.lang.c