C/C++の宿題を片付け ..
[2ch|▼Menu]
305:デフォルトの名無しさん
07/11/27 15:40:23
>>304
ついでにいろいろ修正した。

#include <stdio.h>
#include <stdlib.h>

#ifdef ZEI
# define a ZEI
#else
# define a 5
#endif
#define TAX(x,y) (x+y)*a/100
#define PRICE(x,y) (x+y)+(x+y)*a/100

int main(void)
{
  int x,y;
  printf("lnput an integer x:");
  scanf("%d",&x);
  printf("lnput an integer y:");
  scanf("%d",&y);
#ifdef DEBUG
  printf("tax of x+y %d \n", TAX(x,y));
#endif
  printf("price of x+y %d \n", PRICE(x,y));
  return 0;
}


次ページ
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

5315日前に更新/123 KB
担当:undef